patch to fix PR56005

Vladimir Makarov vmakarov@redhat.com
Wed Jan 16 18:32:00 GMT 2013


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.
-------------- next part --------------
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:


More information about the Gcc-patches mailing list