]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
i386: Standardize shift amount constants as QImode in i386.md.
authorRoger Sayle <roger@nextmovesoftware.com>
Sun, 18 Jun 2023 16:36:26 +0000 (17:36 +0100)
committerRoger Sayle <roger@nextmovesoftware.com>
Sun, 18 Jun 2023 16:36:26 +0000 (17:36 +0100)
This clean-up improves consistency within i386.md by using QImode for
the constant shift count in patterns that specify a mode.

2023-06-18  Roger Sayle  <roger@nextmovesoftware.com>

gcc/ChangeLog
* config/i386/i386.md (*concat<mode><dwi>3_1): Use QImode
for the immediate constant shift count.
(*concat<mode><dwi>3_2): Likewise.
(*concat<mode><dwi>3_3): Likewise.
(*concat<mode><dwi>3_4): Likewise.
(*concat<mode><dwi>3_5): Likewise.
(*concat<mode><dwi>3_6): Likewise.

gcc/config/i386/i386.md

index 93794c178613109c5d84ec07715e062ef19d4bfb..b8d2e3af02acf0f724f7645d739f1b05db730b8d 100644 (file)
   [(set (match_operand:<DWI> 0 "nonimmediate_operand" "=ro,r")
        (any_or_plus:<DWI>
          (ashift:<DWI> (match_operand:<DWI> 1 "register_operand" "r,r")
-                       (match_operand:<DWI> 2 "const_int_operand"))
+                       (match_operand:QI 2 "const_int_operand"))
          (zero_extend:<DWI>
            (match_operand:DWIH 3 "nonimmediate_operand" "r,m"))))]
   "INTVAL (operands[2]) == <MODE_SIZE> * BITS_PER_UNIT"
          (zero_extend:<DWI>
            (match_operand:DWIH 1 "nonimmediate_operand" "r,m"))
          (ashift:<DWI> (match_operand:<DWI> 2 "register_operand" "r,r")
-                       (match_operand:<DWI> 3 "const_int_operand"))))]
+                       (match_operand:QI 3 "const_int_operand"))))]
   "INTVAL (operands[3]) == <MODE_SIZE> * BITS_PER_UNIT"
   "#"
   "&& reload_completed"
          (ashift:<DWI>
            (zero_extend:<DWI>
              (match_operand:DWIH 1 "nonimmediate_operand" "r,m,r,m"))
-           (match_operand:<DWI> 2 "const_int_operand"))
+           (match_operand:QI 2 "const_int_operand"))
          (zero_extend:<DWI>
            (match_operand:DWIH 3 "nonimmediate_operand" "r,r,m,m"))))]
   "INTVAL (operands[2]) == <MODE_SIZE> * BITS_PER_UNIT"
          (ashift:<DWI>
            (zero_extend:<DWI>
              (match_operand:DWIH 2 "nonimmediate_operand" "r,r,m,m"))
-           (match_operand:<DWI> 3 "const_int_operand"))))]
+           (match_operand:QI 3 "const_int_operand"))))]
   "INTVAL (operands[3]) == <MODE_SIZE> * BITS_PER_UNIT"
   "#"
   "&& reload_completed"
   [(set (match_operand:DWI 0 "nonimmediate_operand" "=r,o,o")
        (any_or_plus:DWI
          (ashift:DWI (match_operand:DWI 1 "register_operand" "r,r,r")
-                     (match_operand:DWI 2 "const_int_operand"))
+                     (match_operand:QI 2 "const_int_operand"))
          (match_operand:DWI 3 "const_scalar_int_operand" "n,n,Wd")))]
   "INTVAL (operands[2]) == <MODE_SIZE> * BITS_PER_UNIT / 2
    && (<MODE>mode == DImode
          (ashift:<DWI>
            (zero_extend:<DWI>
              (match_operand:DWIH 1 "nonimmediate_operand" "r,r,r,m"))
-           (match_operand:<DWI> 2 "const_int_operand"))
+           (match_operand:QI 2 "const_int_operand"))
          (match_operand:<DWI> 3 "const_scalar_int_operand" "n,n,Wd,n")))]
   "INTVAL (operands[2]) == <MODE_SIZE> * BITS_PER_UNIT
    && (<DWI>mode == DImode