[PATCH] D118317: [InstCombine] Fold and-reduce idiom
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 27 10:16:11 PST 2022
mkazantsev added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp:5922
+ /// %all_eq = icmp eq i64 %lhs.scalar, %rhs.scalar
+ if (Constant->isZero() && InnerICmp->getPredicate() == ICmpInst::ICMP_NE) {
+ auto *ScalarTy = Builder.getIntNTy(NumBits);
----------------
lebedev.ri wrote:
> I'm guessing you are expecting to handle other patterns?
> Otherwise, early-return.
Yes, there will be others. One of them was mentioned by Sanjay already.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118317/new/
https://reviews.llvm.org/D118317
More information about the llvm-commits
mailing list