[llvm] [LV] Vectorize predicated loop-invariant loads via masked load + broadcast (PR #200361)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 10 06:55:53 PDT 2026


================
@@ -3484,6 +3500,10 @@ class LLVM_ABI_FOR_TEST VPReplicateRecipe : public VPRecipeWithIRFlags,
 
   unsigned getOpcode() const { return getUnderlyingInstr()->getOpcode(); }
 
+  /// Return the scalar result type of the replicated instruction. Note that
+  /// for stores this is the void type.
+  Type *getScalarType() const { return getUnderlyingInstr()->getType(); }
----------------
artagnon wrote:

This should be unnecessary, and I think it is incorrect in the general case: VPRecipeBase already has the correct getScalarType?

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


More information about the llvm-commits mailing list