+2013-01-28 Jakub Jelinek <jakub@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.
+
2013-01-28 Richard Biener <rguenther@suse.de>
* tree-inline.c (remap_gimple_stmt): Do not assing a BLOCK
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:
+2013-01-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/56117
+ * gcc.dg/pr56117.c: New test.
+
2013-01-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/56034
--- /dev/null
+/* PR rtl-optimization/56117 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fsched2-use-superblocks" } */
+
+void
+foo (void *p)
+{
+ __builtin_prefetch (p);
+}