[llvm] [VPlan] Strip bad TODO in VPTransformState::get (NFC) (PR #166146)

via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 3 02:22:45 PST 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-transforms

Author: Ramkumar Ramachandra (artagnon)

<details>
<summary>Changes</summary>

It's impossible to create a VPInstruction::Broadcast at this point, since we need to return an IR Value, which would only be possible after the VPInstruction is executed.

---
Full diff: https://github.com/llvm/llvm-project/pull/166146.diff


1 Files Affected:

- (modified) llvm/lib/Transforms/Vectorize/VPlan.cpp (-1) 


``````````diff
diff --git a/llvm/lib/Transforms/Vectorize/VPlan.cpp b/llvm/lib/Transforms/Vectorize/VPlan.cpp
index 428a8f4c1348f..84c9c9c2de645 100644
--- a/llvm/lib/Transforms/Vectorize/VPlan.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlan.cpp
@@ -319,7 +319,6 @@ Value *VPTransformState::get(const VPValue *Def, bool NeedsScalar) {
 
   // We need to construct the vector value for a single-scalar value by
   // broadcasting the scalar to all lanes.
-  // TODO: Replace by introducing Broadcast VPInstructions.
   assert(IsSingleScalar && "must be a single-scalar at this point");
   // Set the insert point after the last scalarized instruction or after the
   // last PHI, if LastInst is a PHI. This ensures the insertelement sequence

``````````

</details>


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


More information about the llvm-commits mailing list