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 60a2e03 commit 24a9da4Copy full SHA for 24a9da4
llvm/lib/Transforms/Vectorize/VPlanUtils.cpp
@@ -113,7 +113,12 @@ bool vputils::isUniformAcrossVFsAndUFs(VPValue *V) {
113
return TypeSwitch<const VPRecipeBase *, bool>(R)
114
.Case<VPDerivedIVRecipe>([](const auto *R) { return true; })
115
.Case<VPReplicateRecipe>([](const auto *R) {
116
+ // Be conservative about side-effects, except for the
117
+ // known-side-effecting assumes and stores, which we know will be
118
+ // uniform.
119
return R->isSingleScalar() &&
120
+ (!R->mayHaveSideEffects() ||
121
+ isa<AssumeInst, StoreInst>(R->getUnderlyingInstr())) &&
122
all_of(R->operands(), isUniformAcrossVFsAndUFs);
123
})
124
.Case<VPInstruction>([](const auto *VPI) {
0 commit comments