reg-stack.c (get_true_reg): Reorder to fallthru to FLOAT case.
authorUros Bizjak <ubizjak@gmail.com>
Thu, 6 Sep 2018 21:39:47 +0000 (23:39 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Thu, 6 Sep 2018 21:39:47 +0000 (23:39 +0200)
* reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
to fallthru to FLOAT case.

From-SVN: r264151

gcc/ChangeLog
gcc/reg-stack.c

index 5ab342eaa10da03ed9105afe2635058be1e14b08..9657eee0800983e4685947a51970c8315c7d3b4c 100644 (file)
@@ -1,3 +1,8 @@
+2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
+
+       * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
+       to fallthru to FLOAT case.
+
 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
 
        PR target/86731
index 519ea6df75c2345d70c75ad7b26c7a679418763a..0f1b6d52f01ebe403f1e4ba1478ebcb36a97a836 100644 (file)
@@ -413,8 +413,9 @@ get_true_reg (rtx *pat)
        /* Eliminate FP subregister accesses in favor of the
           actual FP register in use.  */
        {
-         rtx subreg;
-         if (STACK_REG_P (subreg = SUBREG_REG (*pat)))
+         rtx subreg = SUBREG_REG (*pat);
+
+         if (STACK_REG_P (subreg))
            {
              int regno_off = subreg_regno_offset (REGNO (subreg),
                                                   GET_MODE (subreg),
@@ -427,6 +428,12 @@ get_true_reg (rtx *pat)
          pat = &XEXP (*pat, 0);
          break;
        }
+
+      case FLOAT_TRUNCATE:
+       if (!flag_unsafe_math_optimizations)
+         return pat;
+       /* FALLTHRU */
+
       case FLOAT:
       case FIX:
       case FLOAT_EXTEND:
@@ -439,12 +446,6 @@ get_true_reg (rtx *pat)
          pat = &XVECEXP (*pat, 0, 0);
        return pat;
 
-      case FLOAT_TRUNCATE:
-       if (!flag_unsafe_math_optimizations)
-         return pat;
-       pat = &XEXP (*pat, 0);
-       break;
-
       default:
        return pat;
       }