i386: Combine splitters followup [PR96226]
authorJakub Jelinek <jakub@redhat.com>
Sat, 5 Dec 2020 00:31:08 +0000 (01:31 +0100)
committerJakub Jelinek <jakub@redhat.com>
Sat, 5 Dec 2020 00:31:08 +0000 (01:31 +0100)
Here is the patch to simplify the newly added combine splitters,
when we split into 2 insns anyway, no reason to split into the masking
define_insn_and_split we'd be splitting shortly after.

2020-12-05  Jakub Jelinek  <jakub@redhat.com>

PR target/96226
* config/i386/i386.md (splitter after *<rotate_insn><mode>3_mask,
splitter after *<rotate_insn><mode>3_mask_1): Drop the masking from
the patterns to split into.

gcc/config/i386/i386.md

index 129d47bb0263096fd1a08e75ab46fa91e00170ec..0b28895abca5e2038fa16b22ca1799a36fbfef22 100644 (file)
  [(set (match_dup 4) (match_dup 1))
   (set (match_dup 0)
        (any_rotate:SWI48 (match_dup 4)
-                        (subreg:QI
-                          (and:SI (match_dup 2) (match_dup 3)) 0)))]
+                        (subreg:QI (match_dup 2) 0)))]
  "operands[4] = gen_reg_rtx (<MODE>mode);")
 
 (define_insn_and_split "*<rotate_insn><mode>3_mask_1"
   == GET_MODE_BITSIZE (<MODE>mode) - 1"
  [(set (match_dup 4) (match_dup 1))
   (set (match_dup 0)
-       (any_rotate:SWI48 (match_dup 4)
-                        (and:QI (match_dup 2) (match_dup 3))))]
+       (any_rotate:SWI48 (match_dup 4) (match_dup 2)))]
  "operands[4] = gen_reg_rtx (<MODE>mode);")
 
 ;; Implement rotation using two double-precision