[llvm] [VPlan] Introduces explicit broadcast for live-in constants. (PR #133213)

Elvis Wang via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 23 23:10:55 PDT 2025


================
@@ -1339,6 +1339,17 @@ class VPWidenRecipe : public VPRecipeWithIRFlags, public VPIRMetadata {
   void print(raw_ostream &O, const Twine &Indent,
              VPSlotTracker &SlotTracker) const override;
 #endif
+
+  bool onlyFirstLaneUsed(const VPValue *Op) const override {
+    assert(is_contained(operands(), Op) &&
+           "Op must be an operand of the recipe");
+    switch (Opcode) {
+    default:
+      return false;
+    case Instruction::ExtractValue:
+      return Op == getOperand(1);
----------------
ElvisWang123 wrote:

Yes, update in #145449. Thanks!

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


More information about the llvm-commits mailing list