[PATCH] D131358: [X86] (sext Cond) | C -> (zext (not Cond)) * (C + 1) - 1 if we can get a LEA out of it.
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 7 09:45:31 PDT 2022
RKSimon added inline comments.
================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:48437
+ // (sext Cond) | C -> (zext (not Cond)) * (C + 1) - 1 if we can get a LEA out of it.
+ if (N0.getOpcode() == ISD::SUB && N0.hasOneUse() &&
----------------
Can you improve this comment? The codegen doesn't seem to pattern matching below.
================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:48445
+ if (Cond.getOpcode() == X86ISD::SETCC && Cond.hasOneUse()) {
+ if (ConstantSDNode *CN = dyn_cast<ConstantSDNode>(N1)) {
+ unsigned Val = CN->getZExtValue();
----------------
auto *CN =
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131358/new/
https://reviews.llvm.org/D131358
More information about the llvm-commits
mailing list