[PATCH] D130203: [RISCV] Optimize (brcond (seteq (and X, 1 << C), 0))
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 20 18:48:32 PDT 2022
craig.topper added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:1375
+ // bit to be tested to the MSB and perform a signed compare with 0.
+ if (isIntEqualitySetCC(CC) & isNullConstant(RHS) &&
+ LHS.getOpcode() == ISD::AND && LHS.hasOneUse() &&
----------------
jrtc27 wrote:
> I assume you don't actually want bit-wise AND here?
Good catch. Fixed when I commited. Thanks!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130203/new/
https://reviews.llvm.org/D130203
More information about the llvm-commits
mailing list