[llvm] [VPlan] Introduce VPInstructionWithType, use instead of VPScalarCast(NFC) (PR #129706)

via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 9 14:50:09 PDT 2025


================
@@ -111,7 +111,11 @@ bool vputils::isUniformAcrossVFsAndUFs(VPValue *V) {
                (isa<LoadInst, StoreInst>(R->getUnderlyingValue())) &&
                all_of(R->operands(), isUniformAcrossVFsAndUFs);
       })
-      .Case<VPScalarCastRecipe, VPWidenCastRecipe>([](const auto *R) {
+      .Case<VPInstruction>([](const auto *VPI) {
+        return Instruction::isCast(VPI->getOpcode()) &&
+               all_of(VPI->operands(), isUniformAcrossVFsAndUFs);
----------------
ayalz wrote:

If it is Cast, suffice to check first operand only, as before (and assert it has a single operand).

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


More information about the llvm-commits mailing list