diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-01-28 16:50:22 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-01-28 16:50:22 +0000 |
commit | 12e51a1d9272bbff14e487691ecccfbc970f637e (patch) | |
tree | 0db0e0a407245a418257e3f7b74f6a99171a2878 /gcc/sched-deps.c | |
parent | 688b0b5b88c7a07d85a396623c523ed8db8ef442 (diff) | |
download | gcc-12e51a1d9272bbff14e487691ecccfbc970f637e.tar.gz |
PR rtl-optimization/56117
* sched-deps.c (sched_analyze_2) <case PREFETCH>: For use_cselib
call cselib_lookup_from_insn on the MEM before calling
add_insn_mem_dependence.
* gcc.dg/pr56117.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@195513 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/sched-deps.c')
-rw-r--r-- | gcc/sched-deps.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/sched-deps.c b/gcc/sched-deps.c index 2b4028663b1..7de974b6358 100644 --- a/gcc/sched-deps.c +++ b/gcc/sched-deps.c @@ -2720,8 +2720,12 @@ sched_analyze_2 (struct deps_desc *deps, rtx x, rtx insn) prefetch has only the start address but it is better to have something than nothing. */ if (!deps->readonly) - add_insn_mem_dependence (deps, true, insn, - gen_rtx_MEM (Pmode, XEXP (PATTERN (insn), 0))); + { + rtx x = gen_rtx_MEM (Pmode, XEXP (PATTERN (insn), 0)); + if (sched_deps_info->use_cselib) + cselib_lookup_from_insn (x, Pmode, true, VOIDmode, insn); + add_insn_mem_dependence (deps, true, insn, x); + } break; case UNSPEC_VOLATILE: |