[llvm] ac4e01e - [SVE][CodeGen] Fix predicate for add/sub + element count patterns

Kerry McLaughlin via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 18 06:43:14 PDT 2021


Author: Kerry McLaughlin
Date: 2021-10-18T14:42:29+01:00
New Revision: ac4e01ea0eb06134e37fc5404af4face8a262807

URL: https://github.com/llvm/llvm-project/commit/ac4e01ea0eb06134e37fc5404af4face8a262807
DIFF: https://github.com/llvm/llvm-project/commit/ac4e01ea0eb06134e37fc5404af4face8a262807.diff

LOG: [SVE][CodeGen] Fix predicate for add/sub + element count patterns

The patterns added in D111441 should use the HasSVEorStreamingSVE
predicate. This changes one incorrect use of HasSVE with the new
patterns.

Added: 
    

Modified: 
    llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td b/llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
index cb83f787a598..8879789e83f7 100644
--- a/llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
+++ b/llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
@@ -1939,7 +1939,7 @@ let Predicates = [HasSVEorStreamingSVE] in {
               (DECD_ZPiI ZPR:$op, 31, $imm)>;
   }
 
-  let Predicates = [HasSVE, UseScalarIncVL], AddedComplexity = 5 in {
+  let Predicates = [HasSVEorStreamingSVE, UseScalarIncVL], AddedComplexity = 5 in {
     def : Pat<(add GPR64:$op, (vscale (sve_cnth_imm i32:$imm))),
               (INCH_XPiI GPR64:$op, 31, $imm)>;
     def : Pat<(add GPR64:$op, (vscale (sve_cntw_imm i32:$imm))),


        


More information about the llvm-commits mailing list