[llvm] cd160a6 - [VPlan] Do not add call results with void type to State (NFC).
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 21 12:36:40 PST 2024
Author: Florian Hahn
Date: 2024-02-21T20:36:17Z
New Revision: cd160a6e98533fbc04a76d1b969db77b49668eb3
URL: https://github.com/llvm/llvm-project/commit/cd160a6e98533fbc04a76d1b969db77b49668eb3
DIFF: https://github.com/llvm/llvm-project/commit/cd160a6e98533fbc04a76d1b969db77b49668eb3.diff
LOG: [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.
Added:
Modified:
llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp b/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
index 9ee0cb2bd61530..2d2f6acf913f10 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
@@ -655,7 +655,8 @@ void VPWidenCallRecipe::execute(VPTransformState &State) {
if (isa<FPMathOperator>(V))
V->copyFastMathFlags(&CI);
- State.set(this, V, Part);
+ if (!V->getType()->isVoidTy())
+ State.set(this, V, Part);
State.addMetadata(V, &CI);
}
}
More information about the llvm-commits
mailing list