re PR target/41993 ([sh] ICE in create_pre_exit, at mode-switching.c:399)
authorUros Bizjak <ubizjak@gmail.com>
Tue, 6 Nov 2012 09:16:34 +0000 (10:16 +0100)
committerKaz Kojima <kkojima@gcc.gnu.org>
Tue, 6 Nov 2012 09:16:34 +0000 (09:16 +0000)
PR target/41993
* mode-switching.c (create_pre_exit): Set return_copy to
last_insn when copy_start is a pseudo reg.

Co-Authored-By: Kaz Kojima <kkojima@gcc.gnu.org>
From-SVN: r193210

gcc/ChangeLog
gcc/mode-switching.c

index fff511fcb152d4e739c7f7cdc58aec2d349085b3..5f9bb4461b7b43a541c1114b6d9b5d50d4313219 100644 (file)
@@ -1,3 +1,10 @@
+2012-11-06  Uros Bizjak  <ubizjak@gmail.com>
+           Kaz Kojima  <kkojima@gcc.gnu.org>
+
+       PR target/41993
+       * mode-switching.c (create_pre_exit): Set return_copy to
+       last_insn when copy_start is a pseudo reg.
+
 2012-11-06  Andrey Turetskiy  <andrey.turetskiy@gmail.com>
 
        * config/i386/i386.c (bdesc_args): Rename CODE_FOR_avx2_umulhrswv16hi3 to
index 2f7455a033ca492f01e06662d8b16ba5d7d5c6be..386f8d1abe9d817d28ccc57d5ba50a7892bf2e3f 100644 (file)
@@ -324,7 +324,10 @@ create_pre_exit (int n_entities, int *entity_map, const int *num_modes)
                    else
                      break;
                    if (copy_start >= FIRST_PSEUDO_REGISTER)
-                     break;
+                     {
+                       last_insn = return_copy;
+                       continue;
+                     }
                    copy_num
                      = hard_regno_nregs[copy_start][GET_MODE (copy_reg)];