[arm] fix constraints on addsi3_carryin_alt2
authorRichard Earnshaw <rearnsha@arm.com>
Fri, 18 Oct 2019 19:02:12 +0000 (19:02 +0000)
committerRichard Earnshaw <rearnsha@gcc.gnu.org>
Fri, 18 Oct 2019 19:02:12 +0000 (19:02 +0000)
addsi3_carryin_alt2 has a more strict constraint than the predicate
when adding a constant.  This leads to sub-optimal code in some
circumstances.

* config/arm/arm.md (addsi3_carryin_alt2): Use arm_not_operand for
operand 2.

From-SVN: r277168

gcc/ChangeLog
gcc/config/arm/arm.md

index cb2abfe..1c96b17 100644 (file)
@@ -1,5 +1,10 @@
 2019-10-18  Richard Earnshaw  <rearnsha@arm.com>
 
+       * config/arm/arm.md (addsi3_carryin_alt2): Use arm_not_operand for
+       operand 2.
+
+2019-10-18  Richard Earnshaw  <rearnsha@arm.com>
+
        * config/arm/arm.md (addsi3_carryin_shift_<optab>): Reorder operands
        to match canonical form.
 
index 9754a76..fbe154a 100644 (file)
   [(set (match_operand:SI 0 "s_register_operand" "=l,r,r")
         (plus:SI (plus:SI (LTUGEU:SI (reg:<cnb> CC_REGNUM) (const_int 0))
                           (match_operand:SI 1 "s_register_operand" "%l,r,r"))
-                 (match_operand:SI 2 "arm_rhs_operand" "l,rI,K")))]
+                 (match_operand:SI 2 "arm_not_operand" "l,rI,K")))]
   "TARGET_32BIT"
   "@
    adc%?\\t%0, %1, %2