]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR rtl-optimization/53373 (ICE on valid code with -mavx)
authorBernd Schmidt <bernds@codesourcery.com>
Mon, 21 May 2012 21:37:01 +0000 (21:37 +0000)
committerBernd Schmidt <bernds@gcc.gnu.org>
Mon, 21 May 2012 21:37:01 +0000 (21:37 +0000)
PR rtl-optimization/53373
* caller-save.c (save_call_clobbered_regs): Look into a possible
PARALLEL manually rather than using single_set on a call insn.

From-SVN: r187745

gcc/ChangeLog
gcc/caller-save.c

index 798ed806f59c12d519cc48902240aee7441dc017..7015fac2809354625e69405e91adae64eb8b87ee 100644 (file)
@@ -1,3 +1,9 @@
+2012-05-21  Bernd Schmidt  <bernds@codesourcery.com>
+
+       PR rtl-optimization/53373
+       * caller-save.c (save_call_clobbered_regs): Look into a possible
+       PARALLEL manually rather than using single_set on a call insn.
+
 2012-05-21  Jakub Jelinek  <jakub@redhat.com>
 
        PR tree-optimization/53436
index c8f3b145946e9060db28504bd42fcb415bab9063..44131f93efd677f44440edef7f3446053cbe91e3 100644 (file)
@@ -872,11 +872,13 @@ save_call_clobbered_regs (void)
                  && HARD_REGISTER_P (cheap)
                  && TEST_HARD_REG_BIT (call_used_reg_set, REGNO (cheap)))
                {
-                 rtx call_set = single_set (insn);
-                 rtx dest = SET_DEST (call_set);
-                 rtx pat = gen_rtx_SET (VOIDmode, cheap,
-                                        copy_rtx (dest));
-                 chain = insert_one_insn (chain, 0, -1, pat);
+                 rtx dest, newpat;
+                 rtx pat = PATTERN (insn);
+                 if (GET_CODE (pat) == PARALLEL)
+                   pat = XVECEXP (pat, 0, 0);
+                 dest = SET_DEST (pat);
+                 newpat = gen_rtx_SET (VOIDmode, cheap, copy_rtx (dest));
+                 chain = insert_one_insn (chain, 0, -1, newpat);
                }
            }
           last = chain;