Skip to content

Commit cd160a6

Browse files
committed
[VPlan] Do not add call results with void type to State (NFC).
With vector libraries, we may vectorize calls with void return types. Do not add those values to the state; they can never be accessed.
1 parent d4fd202 commit cd160a6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,8 @@ void VPWidenCallRecipe::execute(VPTransformState &State) {
655655
if (isa<FPMathOperator>(V))
656656
V->copyFastMathFlags(&CI);
657657

658-
State.set(this, V, Part);
658+
if (!V->getType()->isVoidTy())
659+
State.set(this, V, Part);
659660
State.addMetadata(V, &CI);
660661
}
661662
}

0 commit comments

Comments
 (0)