[llvm] [VPlan] Use VPInstructionWithType for uniform casts. (PR #140623)

via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 9 06:16:23 PDT 2025


================
@@ -177,8 +177,8 @@ class VPBuilder {
                               Type *ResultTy, const VPIRFlags &Flags = {},
                               DebugLoc DL = DebugLoc::getUnknown(),
                               const Twine &Name = "") {
-    return tryInsertInstruction(
-        new VPInstructionWithType(Opcode, Operands, ResultTy, Flags, DL, Name));
+    return tryInsertInstruction(new VPInstructionWithType(
+        Opcode, Operands, ResultTy, Flags, DL, /*IsSingleScalar=*/false, Name));
----------------
ayalz wrote:

Is this a default behavior? I.e., if one isn't sure or doesn't care whether a VPInstruction processes a single scalar or not, then IsSingleScalar is set to false. If so, perhaps `MustBeSingleScalar` or `IsKnownSingleScalar` would be more accurate, and/or an `Unset` alternative. In general additional alternative values may be relevant, see below.

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


More information about the llvm-commits mailing list