[PATCH] D148420: [InstCombine] Enhance select icmp and folding
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 15 02:59:03 PDT 2023
RKSimon added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp:255
+
+ if (X != V)
+ return nullptr;
----------------
Would using m_And(m_Specific(X), m_APInt(C)) avoid the need for this?
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp:259
+ uint32_t BitWidth = V->getType()->getScalarSizeInBits();
+ if (C->countLeadingZeros() + C->countTrailingOnes() != BitWidth ||
+ (int64_t)C->countLeadingZeros() != K->getSExtValue())
----------------
!C->isMask() ?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148420/new/
https://reviews.llvm.org/D148420
More information about the llvm-commits
mailing list