[PATCH] D79874: [RISCV] Add matching of codegen patterns to RISCV Bit Manipulation Zbs asm instructions
Paolo Savini via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 9 18:45:38 PDT 2020
PaoloS marked an inline comment as done.
PaoloS added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfoB.td:666
+let Predicates = [HasStdExtZbs, IsRV64] in
+def : Pat<(and (xor (riscv_sllw 1, GPR:$rs2), -1), GPR:$rs1),
+ (SBCLR GPR:$rs1, GPR:$rs2)>;
----------------
lewis-revill wrote:
> Why does this need to be `riscv_sllw` as opposed to `shl`? Isn't the former intended for matching patterns resulting from a 32 bit operation?
Indeed. That happened because some constants in the samples used to discover the patterns were set by default to 32 bit. Fixed, thank you.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79874/new/
https://reviews.llvm.org/D79874
More information about the llvm-commits
mailing list