[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:39:22 PDT 2021
craig.topper added inline comments.
================
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">;
+
----------------
craig.topper wrote:
> craig.topper wrote:
> > Why does this need to be a ComplexPattern? Can't we do it with an ImmLeaf?
> Maybe we can't check one use from ImmLeaf?
But we can use PatLeaf<(imm), [{ }]> I think that's the way to go. I'll post a patch to do the same to AddiPair.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102398/new/
https://reviews.llvm.org/D102398
More information about the llvm-commits
mailing list