[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


================
@@ -1079,13 +1081,16 @@ void VPInstruction::print(raw_ostream &O, const Twine &Indent,
 
 void VPInstructionWithType::execute(VPTransformState &State) {
   State.setDebugLocFrom(getDebugLoc());
-  if (isScalarCast()) {
+  if (Instruction::isCast(getOpcode())) {
----------------
ayalz wrote:

```suggestion
  if (Instruction::isCast(getOpcode())) {
    assert(isSingleScalar(this) && "VPInstructionWithType models casts of single scalars only");
```
before working with VPlan(0) only below?

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


More information about the llvm-commits mailing list