patch to fix PR62642

Vladimir Makarov vmakarov@redhat.com
Mon Dec 15 20:10:00 GMT 2014


   The following patch fixes

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62642

   The patch was successfully bootstrapped on x86-64.

   It is difficult for me to make a testcase to check the right code 
generation.  So the patch has no test.

Committed as rev. 218761.

2014-12-15  Vladimir Makarov  <vmakarov@redhat.com>

         PR target/62642
         * ira.c (rtx_moveable_p): Prevent UNSPEC_VOLATILE moves.
-------------- next part --------------
Index: ira.c
===================================================================
--- ira.c	(revision 218685)
+++ ira.c	(working copy)
@@ -4358,6 +4358,12 @@ rtx_moveable_p (rtx *loc, enum op_type t
     case CLOBBER:
       return rtx_moveable_p (&SET_DEST (x), OP_OUT);
 
+    case UNSPEC_VOLATILE:
+      /* It is a bad idea to consider insns with with such rtl
+	 as moveable ones.  The insn scheduler also considers them as barrier
+	 for a reason.  */
+      return false;
+
     default:
       break;
     }


More information about the Gcc-patches mailing list