We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0c5319e commit 6db1803Copy full SHA for 6db1803
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -3863,7 +3863,8 @@ bool LoopVectorizationCostModel::isPredicatedInst(Instruction *I) const {
3863
case Instruction::URem:
3864
// TODO: We can use the loop-preheader as context point here and get
3865
// context sensitive reasoning
3866
- return !isSafeToSpeculativelyExecute(I);
+ return !isSafeToSpeculativelyExecute(I) &&
3867
+ !Legal->isInvariant(I->getOperand(1));
3868
case Instruction::Call:
3869
return Legal->isMaskRequired(I);
3870
}
0 commit comments