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