[PATCH] D102398: [RISCV] Optimize or/xor with immediate
Ben Shi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 14 08:07:24 PDT 2021
benshi001 added a comment.
In D102398#2758657 <https://reviews.llvm.org/D102398#2758657>, @MaskRay wrote:
> Can this be moved into `RISCVTargetLowering::targetShrinkDemandedConstant`? aarch64 has a great `optimizeLogicalImm` which may give some inspiration.
Thanks. I have investigated AArch64's `targetShrinkDemandedConstant` and `optimizeLogicalImm`, but do not think my optimization is suitable to be there.
AArch64's `optimizeLogicalImm` does optimize the immediate operand but does not change the operator.
While my optimization changes the operator or/xor to bseti/binvi.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102398/new/
https://reviews.llvm.org/D102398
More information about the llvm-commits
mailing list