[llvm] 8faf2a0 - [RISCV] Correct predicate orc.b pattern to not include Zbkb.

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 29 00:11:00 PST 2022


Author: Craig Topper
Date: 2022-01-29T00:10:54-08:00
New Revision: 8faf2a0638d3e8d9411d55c3e5dfb7b452f35ca2

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

LOG: [RISCV] Correct predicate orc.b pattern to not include Zbkb.

This was incorrectly lumped in when the predicate was changed for
the rotate instructions.

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 bf1f493683ce..1d74ca1acc77 100644
--- a/llvm/lib/Target/RISCV/RISCVInstrInfoZb.td
+++ b/llvm/lib/Target/RISCV/RISCVInstrInfoZb.td
@@ -862,7 +862,9 @@ let Predicates = [HasStdExtZbbOrZbpOrZbkb] in {
 def : PatGprImm<rotr, RORI, uimmlog2xlen>;
 def : Pat<(rotl GPR:$rs1, uimmlog2xlen:$shamt),
           (RORI GPR:$rs1, (ImmSubFromXLen uimmlog2xlen:$shamt))>;
+}
 
+let Predicates = [HasStdExtZbbOrZbp] in {
 // We treat orc.b as a separate instruction, so match it directly. We also
 // lower the Zbb orc.b intrinsic to this.
 def : Pat<(riscv_gorc GPR:$rs1, 7), (ORC_B GPR:$rs1)>;


        


More information about the llvm-commits mailing list