]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
i386: Rename extr_register_operand to int248_register_operand
authorUros Bizjak <ubizjak@gmail.com>
Wed, 15 Feb 2023 15:24:29 +0000 (16:24 +0100)
committerUros Bizjak <ubizjak@gmail.com>
Wed, 15 Feb 2023 15:24:29 +0000 (16:24 +0100)
No functional changes.

gcc/ChangeLog:

2023-02-15  Uroš Bizjak  <ubizjak@gmail.com>

* config/i386/predicates.md (int248_register_operand):
Rename from extr_register_operand.
* config/i386/i386.md (*extv<mode>): Update for renamed predicate.
(*extzx<mode>): Ditto.
(*ashl<dwi>3_doubleword_mask): Use int248_register_operand predicate.
(*ashl<mode>3_mask): Ditto.
(*<any_shiftrt:insn><mode>3_mask): Ditto.
(*<any_shiftrt:insn><dwi>3_doubleword_mask): Ditto.
(*<any_rotate:insn><mode>3_mask): Ditto.
(*<btsc><mode>_mask): Ditto.
(*btr<mode>_mask): Ditto.
(*jcc_bt<mode>_mask_1): Ditto.

gcc/config/i386/i386.md
gcc/config/i386/predicates.md

index 5a946beb1c6a1700615527939a3038183ccceace..e37bc8dca538cfc311ac7c8f7d23af3f9028b28d 100644 (file)
 
 (define_insn "*extv<mode>"
   [(set (match_operand:SWI24 0 "register_operand" "=R")
-       (sign_extract:SWI24 (match_operand 1 "extr_register_operand" "Q")
+       (sign_extract:SWI24 (match_operand 1 "int248_register_operand" "Q")
                            (const_int 8)
                            (const_int 8)))]
   ""
 
 (define_insn "*extzv<mode>"
   [(set (match_operand:SWI248 0 "register_operand" "=R")
-       (zero_extract:SWI248 (match_operand 1 "extr_register_operand" "Q")
+       (zero_extract:SWI248 (match_operand 1 "int248_register_operand" "Q")
                             (const_int 8)
                             (const_int 8)))]
   ""
          (match_operand:<DWI> 1 "register_operand")
          (subreg:QI
            (and
-             (match_operand 2 "register_operand" "c")
+             (match_operand 2 "int248_register_operand" "c")
              (match_operand 3 "const_int_operand")) 0)))
    (clobber (reg:CC FLAGS_REG))]
   "((INTVAL (operands[3]) & (<MODE_SIZE> * BITS_PER_UNIT)) == 0
     || ((INTVAL (operands[3]) & (2 * <MODE_SIZE> * BITS_PER_UNIT - 1))
         == (2 * <MODE_SIZE> * BITS_PER_UNIT - 1)))
-   && GET_MODE_CLASS (GET_MODE (operands[2])) == MODE_INT
-   && IN_RANGE (GET_MODE_SIZE (GET_MODE (operands[2])), 2,
-               4 << (TARGET_64BIT ? 1 : 0))
    && ix86_pre_reload_split ()"
   "#"
   "&& 1"
          (match_operand:SWI48 1 "nonimmediate_operand")
          (subreg:QI
            (and
-             (match_operand 2 "register_operand" "c,r")
+             (match_operand 2 "int248_register_operand" "c,r")
              (match_operand 3 "const_int_operand")) 0)))
    (clobber (reg:CC FLAGS_REG))]
   "ix86_binary_operator_ok (ASHIFT, <MODE>mode, operands)
    && (INTVAL (operands[3]) & (GET_MODE_BITSIZE (<MODE>mode)-1))
       == GET_MODE_BITSIZE (<MODE>mode)-1
-   && GET_MODE_CLASS (GET_MODE (operands[2])) == MODE_INT
-   && IN_RANGE (GET_MODE_SIZE (GET_MODE (operands[2])), 2,
-               4 << (TARGET_64BIT ? 1 : 0))
    && ix86_pre_reload_split ()"
   "#"
   "&& 1"
          (match_operand:SWI48 1 "nonimmediate_operand")
          (subreg:QI
            (and
-             (match_operand 2 "register_operand" "c,r")
+             (match_operand 2 "int248_register_operand" "c,r")
              (match_operand 3 "const_int_operand")) 0)))
    (clobber (reg:CC FLAGS_REG))]
   "ix86_binary_operator_ok (<CODE>, <MODE>mode, operands)
    && (INTVAL (operands[3]) & (GET_MODE_BITSIZE (<MODE>mode)-1))
       == GET_MODE_BITSIZE (<MODE>mode)-1
-   && GET_MODE_CLASS (GET_MODE (operands[2])) == MODE_INT
-   && IN_RANGE (GET_MODE_SIZE (GET_MODE (operands[2])), 2,
-               4 << (TARGET_64BIT ? 1 : 0))
    && ix86_pre_reload_split ()"
   "#"
   "&& 1"
          (match_operand:<DWI> 1 "register_operand")
          (subreg:QI
            (and
-             (match_operand 2 "register_operand" "c")
+             (match_operand 2 "int248_register_operand" "c")
              (match_operand 3 "const_int_operand")) 0)))
    (clobber (reg:CC FLAGS_REG))]
   "((INTVAL (operands[3]) & (<MODE_SIZE> * BITS_PER_UNIT)) == 0
     || ((INTVAL (operands[3]) & (2 * <MODE_SIZE> * BITS_PER_UNIT - 1))
         == (2 * <MODE_SIZE> * BITS_PER_UNIT - 1)))
-   && GET_MODE_CLASS (GET_MODE (operands[2])) == MODE_INT
-   && IN_RANGE (GET_MODE_SIZE (GET_MODE (operands[2])), 2,
-               4 << (TARGET_64BIT ? 1 : 0))
    && ix86_pre_reload_split ()"
   "#"
   "&& 1"
          (match_operand:SWI 1 "nonimmediate_operand")
          (subreg:QI
            (and
-             (match_operand 2 "register_operand" "c")
+             (match_operand 2 "int248_register_operand" "c")
              (match_operand 3 "const_int_operand")) 0)))
    (clobber (reg:CC FLAGS_REG))]
   "ix86_binary_operator_ok (<CODE>, <MODE>mode, operands)
    && (INTVAL (operands[3]) & (GET_MODE_BITSIZE (<MODE>mode)-1))
       == GET_MODE_BITSIZE (<MODE>mode)-1
-   && GET_MODE_CLASS (GET_MODE (operands[2])) == MODE_INT
-   && IN_RANGE (GET_MODE_SIZE (GET_MODE (operands[2])), 2,
-               4 << (TARGET_64BIT ? 1 : 0))
    && ix86_pre_reload_split ()"
   "#"
   "&& 1"
          (match_operand:SWI 1 "const_int_operand")
          (subreg:QI
            (and
-             (match_operand 2 "register_operand")
+             (match_operand 2 "int248_register_operand")
              (match_operand 3 "const_int_operand")) 0)))]
  "(INTVAL (operands[3]) & (GET_MODE_BITSIZE (<MODE>mode) - 1))
-   == GET_MODE_BITSIZE (<MODE>mode) - 1
-  && GET_MODE_CLASS (GET_MODE (operands[2])) == MODE_INT
-  && IN_RANGE (GET_MODE_SIZE (GET_MODE (operands[2])), 2,
-              4 << (TARGET_64BIT ? 1 : 0))"
+   == GET_MODE_BITSIZE (<MODE>mode) - 1"
  [(set (match_dup 4) (match_dup 1))
   (set (match_dup 0)
        (any_rotate:SWI (match_dup 4)
            (const_int 1)
            (subreg:QI
              (and
-               (match_operand 1 "register_operand")
+               (match_operand 1 "int248_register_operand")
                (match_operand 2 "const_int_operand")) 0))
          (match_operand:SWI48 3 "register_operand")))
    (clobber (reg:CC FLAGS_REG))]
   "TARGET_USE_BT
    && (INTVAL (operands[2]) & (GET_MODE_BITSIZE (<MODE>mode)-1))
       == GET_MODE_BITSIZE (<MODE>mode)-1
-   && GET_MODE_CLASS (GET_MODE (operands[1])) == MODE_INT
-   && IN_RANGE (GET_MODE_SIZE (GET_MODE (operands[1])), 2,
-               4 << (TARGET_64BIT ? 1 : 0))
    && ix86_pre_reload_split ()"
   "#"
   "&& 1"
            (const_int -2)
            (subreg:QI
              (and
-               (match_operand 1 "register_operand")
+               (match_operand 1 "int248_register_operand")
                (match_operand 2 "const_int_operand")) 0))
          (match_operand:SWI48 3 "register_operand")))
    (clobber (reg:CC FLAGS_REG))]
   "TARGET_USE_BT
    && (INTVAL (operands[2]) & (GET_MODE_BITSIZE (<MODE>mode)-1))
       == GET_MODE_BITSIZE (<MODE>mode)-1
-   && GET_MODE_CLASS (GET_MODE (operands[1])) == MODE_INT
-   && IN_RANGE (GET_MODE_SIZE (GET_MODE (operands[1])), 2,
-               4 << (TARGET_64BIT ? 1 : 0))
    && ix86_pre_reload_split ()"
   "#"
   "&& 1"
                           (zero_extend:SI
                             (subreg:QI
                               (and
-                                (match_operand 2 "register_operand")
+                                (match_operand 2 "int248_register_operand")
                                 (match_operand 3 "const_int_operand")) 0)))])
                      (label_ref (match_operand 4))
                      (pc)))
   "(TARGET_USE_BT || optimize_function_for_size_p (cfun))
    && (INTVAL (operands[3]) & (GET_MODE_BITSIZE (<MODE>mode)-1))
       == GET_MODE_BITSIZE (<MODE>mode)-1
-   && GET_MODE_CLASS (GET_MODE (operands[2])) == MODE_INT
-   && IN_RANGE (GET_MODE_SIZE (GET_MODE (operands[2])), 2,
-               4 << (TARGET_64BIT ? 1 : 0))
    && ix86_pre_reload_split ()"
   "#"
   "&& 1"
index cca64f00a6aae5a6341471fe81af37a375df5afc..2f079a6fad8a46edfe8f95130a6abc3a3d29df43 100644 (file)
@@ -92,8 +92,8 @@
   (and (match_code "reg")
        (match_test "MASK_REGNO_P (REGNO (op))")))
 
-;; Match a DI, SI or HImode register operand for extract op.
-(define_special_predicate "extr_register_operand"
+;; Match a DI, SI or HImode register operand.
+(define_special_predicate "int248_register_operand"
   (and (match_operand 0 "register_operand")
        (ior (and (match_test "TARGET_64BIT")
                 (match_test "GET_MODE (op) == DImode"))