[PATCH] D89628: Fix constant-folding of overflowing arithmetic ops on vectors
David Majnemer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 31 09:27:10 PDT 2020
majnemer added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp:4582-4584
+ Type *OverflowTy = Type::getInt1Ty(LHS->getContext());
+ if (auto *LHSTy = dyn_cast<VectorType>(LHS->getType()))
+ OverflowTy = VectorType::get(OverflowTy, LHSTy->getElementCount());
----------------
I think this can be simplified to `CmpInst::makeCmpResultType(LHS->getType())`
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89628/new/
https://reviews.llvm.org/D89628
More information about the llvm-commits
mailing list