[PATCH] D89628: Don't fold overflowing arithmetic ops on vectors
LemonBoy via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 17 13:33:05 PDT 2020
LemonBoy added a comment.
> Doesn't the same issue apply to the isNeutralValue branch?
Duh, fixed that too.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp:4595
Result->takeName(&OrigI);
- Overflow = Builder.getTrue();
+ if (Result->getType()->isVectorTy()) {
+ Overflow = ConstantVector::getSplat(
----------------
lebedev.ri wrote:
> This seems like wrong granularity.
> I think there should be some method that would return an appropriate i1 or vector of i1 type,
> which you'd then just pass into `ConstantInt::getFalse()`/`ConstantInt::getTrue()`.
That's the prettiest way to get a constant `i1xN` vector I found. I'm not too familiar with the internal LLVM APIs so suggestions are more than welcome.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89628/new/
https://reviews.llvm.org/D89628
More information about the llvm-commits
mailing list