diff mbox

patch to fix PR56005

Message ID 50F6F214.80107@redhat.com
State New
Headers show

Commit Message

Vladimir Makarov Jan. 16, 2013, 6:31 p.m. UTC
The following patch fixes PR56005.  The details are on

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56005

2013-01-16  Vladimir Makarov  <vmakarov@redhat.com>

         PR rtl-optimization/56005
         * sched-deps.c (sched_analyze_2): Check deps->readonly for adding
         pending reads for prefetch.

The patch was successfully bootstrapped and tested on x86-64.

Committed as rev 195247.
diff mbox

Patch

Index: sched-deps.c
===================================================================
--- sched-deps.c	(revision 195244)
+++ sched-deps.c	(working copy)
@@ -2719,8 +2719,9 @@  sched_analyze_2 (struct deps_desc *deps,
 	 to generate accurate dependencies for prefetch insns as
 	 prefetch has only the start address but it is better to have
 	 something than nothing.  */
-      add_insn_mem_dependence (deps, true, insn,
-			       gen_rtx_MEM (Pmode, XEXP (PATTERN (insn), 0)));
+      if (!deps->readonly)
+	add_insn_mem_dependence (deps, true, insn,
+				 gen_rtx_MEM (Pmode, XEXP (PATTERN (insn), 0)));
       break;
 
     case UNSPEC_VOLATILE: