Skip to content

Commit

Permalink
[RISCV] Correct predicate orc.b pattern to not include Zbkb.
Browse files Browse the repository at this point in the history
This was incorrectly lumped in when the predicate was changed for
the rotate instructions.
  • Loading branch information
topperc committed Jan 29, 2022
1 parent 864767a commit 8faf2a0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions llvm/lib/Target/RISCV/RISCVInstrInfoZb.td
Expand Up @@ -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)>;
Expand Down

0 comments on commit 8faf2a0

Please sign in to comment.