[llvm] [VPlan] Introduce explicit broadcasts for live-ins. (PR #124644)
    via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Feb  6 14:06:52 PST 2025
    
    
  
================
@@ -1558,6 +1566,13 @@ class VPWidenGEPRecipe : public VPRecipeWithIRFlags {
   void print(raw_ostream &O, const Twine &Indent,
              VPSlotTracker &SlotTracker) const override;
 #endif
+
+  /// Returns true if the recipe only uses the first lane of operand \p Op.
+  bool onlyFirstLaneUsed(const VPValue *Op) const override {
+    assert(is_contained(operands(), Op) &&
+           "Op must be an operand of the recipe");
+    return Op == getOperand(0);
----------------
ayalz wrote:
```suggestion
    return Op == getOperand(0) && isPointerLoopInvariant();
```
?
https://github.com/llvm/llvm-project/pull/124644
    
    
More information about the llvm-commits
mailing list