On 01/28/2013 07:14 AM, Jakub Jelinek wrote:
Hi!
We ICE on the following testcase when using cselib, because
cselib_lookup* is never called on the PREFETCH argument, and
add_insn_mem_dependence calls cselib_subst_to_values on it, which
assumes cselib_lookup* already happened on it earlier.
For MEMs sched_analyze_2 calls cselib_lookup_from_insn, but for PREFETCHes
it didn't.
Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux,
ok for trunk?
2013-01-28 Jakub Jelinek <ja...@redhat.com>
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.
I'm assuming that we don't need the shallow_copy_rtx call and related
code because in the PREFETCH case we generate a new MEM and the
underlying address can be safely shared. Right?
If that's true, OK.
jeff