[llvm] [VPlan] Encode single-scalar-ness of VPInstruction in a field (NFC). (PR #227761)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 5 12:52:17 PDT 2026


================
@@ -605,15 +605,36 @@ Type *VPReplicateRecipe::computeScalarType(const Instruction *I,
   return computeScalarTypeForInstruction(Opcode, Operands);
 }
 
+/// Returns true if VPInstructions with \p Opcode always produce a single
+/// scalar.
+static bool isAlwaysSingleScalar(unsigned Opcode) {
----------------
artagnon wrote:

I think we want alwaysGeneratesSingleScalar here, and include vector-to-scalar, and the previous single-scalar here?

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


More information about the llvm-commits mailing list