This builds on D132771 to invert (setlt 0, X) to (setlt X, 1) and
vice versa.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
LGTM
llvm/lib/Target/RISCV/RISCVISelLowering.cpp | ||
---|---|---|
9210 | I think we can generalize this for any constant operand where adding one doesn't overflow? If so, mind doing that in a follow up? |
llvm/lib/Target/RISCV/RISCVISelLowering.cpp | ||
---|---|---|
9210 | Its more complicated because the constant on the LHS can't be folded into the instruction. 0 is special because it will select x0. But I'll try to see if there is anything that makes sense. |
llvm/lib/Target/RISCV/RISCVISelLowering.cpp | ||
---|---|---|
9210 | Good point on the constant LHS bit. Hadn't considered that. |
clang-format not found in user’s local PATH; not linting file.