diff mbox

patch to fix PR64671

Message ID 54BD6623.8040909@redhat.com
State New
Headers show

Commit Message

Vladimir Makarov Jan. 19, 2015, 8:16 p.m. UTC
The following patch fixes

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

   The patch was successfully bootstrapped on x86-64.I don't expect that 
the patch can result in any trouble.

   Committed as rev. 219857.

2015-01-19  Vladimir Makarov  <vmakarov@redhat.com>

         PR rtl-optimization/64671
         * lra-remat.c (operand_to_remat): Don't consider jump and call
         insns.
diff mbox

Patch

Index: lra-remat.c
===================================================================
--- lra-remat.c	(revision 219705)
+++ lra-remat.c	(working copy)
@@ -413,6 +413,9 @@  operand_to_remat (rtx_insn *insn)
   struct lra_static_insn_data *static_id = id->insn_static_data;
   struct lra_insn_reg *reg, *found_reg = NULL;
 
+  /* Don't rematerialize insns which can change PC.  */
+  if (JUMP_P (insn) || CALL_P (insn))
+    return -1;
   /* First find a pseudo which can be rematerialized.  */
   for (reg = id->regs; reg != NULL; reg = reg->next)
     /* True FRAME_POINTER_NEEDED might be because we can not follow