[llvm] 21dad9a - [RISCV][NFC] Add IsRV64 predicate in xperm.w pattern

Ben Shi via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 14 20:23:21 PST 2022


Author: Lian Wang
Date: 2022-01-15T04:22:16Z
New Revision: 21dad9a522070188c54e35aa379b2d043d9d591f

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

LOG: [RISCV][NFC] Add IsRV64 predicate in xperm.w pattern

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D117191

Added: 
    

Modified: 
    llvm/lib/Target/RISCV/RISCVInstrInfoZb.td

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/RISCV/RISCVInstrInfoZb.td b/llvm/lib/Target/RISCV/RISCVInstrInfoZb.td
index 12ce6ce738207..3a0b5a5b694c6 100644
--- a/llvm/lib/Target/RISCV/RISCVInstrInfoZb.td
+++ b/llvm/lib/Target/RISCV/RISCVInstrInfoZb.td
@@ -838,13 +838,15 @@ def : PatGprGpr<riscv_unshfl, UNSHFL>;
 def : PatGprGpr<int_riscv_xperm_n, XPERMN>;
 def : PatGprGpr<int_riscv_xperm_b, XPERMB>;
 def : PatGprGpr<int_riscv_xperm_h, XPERMH>;
-def : PatGprGpr<int_riscv_xperm_w, XPERMW>;
 def : PatGprImm<riscv_shfl, SHFLI, shfl_uimm>;
 def : PatGprImm<riscv_unshfl, UNSHFLI, shfl_uimm>;
 def : PatGprImm<riscv_grev, GREVI, uimmlog2xlen>;
 def : PatGprImm<riscv_gorc, GORCI, uimmlog2xlen>;
 } // Predicates = [HasStdExtZbp]
 
+let Predicates = [HasStdExtZbp, IsRV64] in
+def : PatGprGpr<int_riscv_xperm_w, XPERMW>;
+
 let Predicates = [HasStdExtZbp, IsRV32] in {
 def : Pat<(i32 (rotr (riscv_grev GPR:$rs1, 24), (i32 16))), (GREVI GPR:$rs1, 8)>;
 def : Pat<(i32 (rotl (riscv_grev GPR:$rs1, 24), (i32 16))), (GREVI GPR:$rs1, 8)>;


        


More information about the llvm-commits mailing list