[PATCH] D102398: [RISCV] Optimize or/xor with immediate
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 14 09:22:42 PDT 2021
craig.topper added a comment.
Please write a description of the patch so that it will go in the git log when it's committed. It would be good if you could mention Zbs in the title.
================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfoB.td:91
+// Check if this mask has two set bits and is used only once.
+def BSETINVTwoBitsMask : ComplexPattern<XLenVT, 1, "selectTwoBitsMask">;
+
----------------
Why does this need to be a ComplexPattern? Can't we do it with an ImmLeaf?
================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfoB.td:93
+
+def BSETINVTwoBtisMaskLow : SDNodeXForm<imm, [{
+ uint64_t I = N->getZExtValue();
----------------
Btis->Bits
================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfoB.td:99
+
+def BSETINVTwoBtisMaskHigh : SDNodeXForm<imm, [{
+ uint64_t I = N->getZExtValue();
----------------
Btis->Bits
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102398/new/
https://reviews.llvm.org/D102398
More information about the llvm-commits
mailing list