[llvm] [VPlan] Consistently use (Part, 0) for first lane scalar values (PR #80271)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 7 05:09:10 PST 2024


================
@@ -213,8 +213,13 @@ VPBasicBlock::iterator VPBasicBlock::getFirstNonPhi() {
 }
 
 Value *VPTransformState::get(VPValue *Def, const VPIteration &Instance) {
-  if (Def->isLiveIn())
-    return Def->getLiveInIRValue();
+  if (Def->isLiveIn()) {
+    if (Value *V = Def->getLiveInIRValue())
----------------
fhahn wrote:

Not necessarily at the moment, LiveIns don't have a defining recipe, but they also may not have a LiveInIRValue as their value only becomes known later, for example `VFxUF`, `BackedgeTakenCount` or `VectorTripCount`, which are set in the state in prepareToExecute.

https://github.com/llvm/llvm-project/pull/80271


More information about the llvm-commits mailing list