]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
i386.md (*lea<mode>_general_4): Use const_0_to_3_operand predicate for operand 2.
authorUros Bizjak <ubizjak@gmail.com>
Sun, 24 Apr 2016 22:03:15 +0000 (00:03 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Sun, 24 Apr 2016 22:03:15 +0000 (00:03 +0200)
* config/i386/i386.md (*lea<mode>_general_4): Use const_0_to_3_operand
predicate for operand 2.

From-SVN: r235397

gcc/ChangeLog
gcc/config/i386/i386.md

index 2ef411c6d08c4bf2d8da2c1c66c208af4937a2bd..8e7059e0e0efba737e4b0744292caa757ad7ffda 100644 (file)
@@ -1,3 +1,8 @@
+2016-04-25  Uros Bizjak  <ubizjak@gmail.com>
+
+       * config/i386/i386.md (*lea<mode>_general_4): Use const_0_to_3_operand
+       predicate for operand 2.
+
 2016-04-24  Uros Bizjak  <ubizjak@gmail.com>
            H.J. Lu  <hongjiu.lu@intel.com>
 
index 25be5ca26fd935de92fd471360691420ba7507fc..d7ac54e4cbec0aabe0d93be3a73f20ba1b6a50cc 100644 (file)
        (any_or:SWI12
          (ashift:SWI12
            (match_operand:SWI12 1 "index_register_operand" "l")
-           (match_operand:SWI12 2 "const_int_operand" "n"))
+           (match_operand:SWI12 2 "const_0_to_3_operand" "n"))
          (match_operand:SWI12 3 "const_int_operand" "n")))]
   "(!TARGET_PARTIAL_REG_STALL || optimize_function_for_size_p (cfun))
-   && (unsigned HOST_WIDE_INT) INTVAL (operands[2]) <= 3
    && ((unsigned HOST_WIDE_INT) INTVAL (operands[3])
        < (HOST_WIDE_INT_1U << INTVAL (operands[2])))"
   "#"
        (any_or:SWI48
          (ashift:SWI48
            (match_operand:SWI48 1 "index_register_operand" "l")
-           (match_operand:SWI48 2 "const_int_operand" "n"))
+           (match_operand:SWI48 2 "const_0_to_3_operand" "n"))
          (match_operand:SWI48 3 "const_int_operand" "n")))]
-  "(unsigned HOST_WIDE_INT) INTVAL (operands[2]) <= 3
-   && ((unsigned HOST_WIDE_INT) INTVAL (operands[3])
-       < (HOST_WIDE_INT_1U << INTVAL (operands[2])))"
+  "(unsigned HOST_WIDE_INT) INTVAL (operands[3])
+   < (HOST_WIDE_INT_1U << INTVAL (operands[2]))"
   "#"
   "&& reload_completed"
   [(set (match_dup 0)
   if (len == HOST_BITS_PER_WIDE_INT)
     mask = -1;
   else
-    mask = ((HOST_WIDE_INT)1 << len) - 1;
+    mask = (HOST_WIDE_INT_1 << len) - 1;
   mask <<= pos;
 
   operands[2] = gen_rtx_AND (mode, val, gen_int_mode (mask, mode));