re PR target/57491 ([ia64] internal compiler error: in ia64_split_tmode -O2, quadmath)
authorKirill Yukhin <kirill.yukhin@intel.com>
Thu, 14 Nov 2013 08:33:21 +0000 (08:33 +0000)
committerKirill Yukhin <kyukhin@gcc.gnu.org>
Thu, 14 Nov 2013 08:33:21 +0000 (08:33 +0000)
        PR target/57491
        * config/ia64/ia64.c (ia64_split_tmode_move): Relax `dead'
        flag setting.

From-SVN: r204777

gcc/ChangeLog
gcc/config/ia64/ia64.c

index 598268e..1a591cb 100644 (file)
@@ -1,3 +1,9 @@
+2013-11-14  Kirill Yukhin  <kirill.yukhin@intel.com>
+
+       PR target/57491
+       * config/ia64/ia64.c (ia64_split_tmode_move): Relax `dead'
+       flag setting.
+
 2013-11-14  Jakub Jelinek  <jakub@redhat.com>
            Uros Bizjak  <ubizjak@gmail.com>
 
index 2b33187..a28575c 100644 (file)
@@ -1529,12 +1529,19 @@ ia64_split_tmode_move (rtx operands[])
       && reg_overlap_mentioned_p (operands[0], operands[1]))
     {
       rtx base = XEXP (operands[1], 0);
+      rtx first_write = gen_rtx_REG (DImode, REGNO (operands[0]));
       while (GET_CODE (base) != REG)
        base = XEXP (base, 0);
 
       if (REGNO (base) == REGNO (operands[0]))
-       reversed = true;
-      dead = true;
+       {
+         reversed = true;
+         first_write = gen_rtx_REG (DImode, REGNO (operands[0]) + 1);
+       }
+
+      if (GET_CODE (operands[0]) == REG
+         && reg_overlap_mentioned_p (first_write, operands[1]))
+       dead = true;
     }
   /* Another reason to do the moves in reversed order is if the first
      element of the target register pair is also the second element of