[llvm] [VPlan] Consolidate VPIWithType and VPI (NFC) (PR #203019)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 30 19:59:48 PDT 2026


================
@@ -1505,6 +1505,11 @@ class LLVM_ABI_FOR_TEST VPInstruction : public VPRecipeWithIRFlags,
   /// Returns true if the recipe only uses the first lane of operand \p Op.
   bool usesFirstLaneOnly(const VPValue *Op) const override;
 
+  /// Returns true if the recipe only uses scalars of operand \p Op.
+  bool usesScalars(const VPValue *Op) const override {
+    return Instruction::isCast(getOpcode()) || usesFirstLaneOnly(Op);
----------------
lukel97 wrote:

Can we not assert that the operands are scalar?

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


More information about the llvm-commits mailing list