[llvm] 1a5a1e9 - [VPlan] Assert that VFxUF is always used.
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 9 06:26:18 PDT 2024
Author: Florian Hahn
Date: 2024-09-09T14:26:09+01:00
New Revision: 1a5a1e97817c9a3db4d1f9795789c99790cf88e2
URL: https://github.com/llvm/llvm-project/commit/1a5a1e97817c9a3db4d1f9795789c99790cf88e2
DIFF: https://github.com/llvm/llvm-project/commit/1a5a1e97817c9a3db4d1f9795789c99790cf88e2.diff
LOG: [VPlan] Assert that VFxUF is always used.
Add assertion to ensure invariant discussed in
https://github.com/llvm/llvm-project/pull/95305.
Added:
Modified:
llvm/lib/Transforms/Vectorize/VPlan.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/VPlan.cpp b/llvm/lib/Transforms/Vectorize/VPlan.cpp
index ac322638056879..0ed9b1b41eec3b 100644
--- a/llvm/lib/Transforms/Vectorize/VPlan.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlan.cpp
@@ -934,6 +934,7 @@ void VPlan::prepareToExecute(Value *TripCountV, Value *VectorTripCountV,
IRBuilder<> Builder(State.CFG.PrevBB->getTerminator());
// FIXME: Model VF * UF computation completely in VPlan.
+ assert(VFxUF.getNumUsers() && "VFxUF expected to always have users");
VFxUF.setUnderlyingValue(
createStepForVF(Builder, TripCountV->getType(), State.VF, State.UF));
More information about the llvm-commits
mailing list