@@ -1427,7 +1427,15 @@ class VPWidenRecipe : public VPRecipeWithIRFlags {
1427
1427
return R;
1428
1428
}
1429
1429
1430
- VP_CLASSOF_IMPL (VPDef::VPWidenSC)
1430
+ static inline bool classof (const VPRecipeBase *R) {
1431
+ return R->getVPDefID () == VPRecipeBase::VPWidenSC ||
1432
+ R->getVPDefID () == VPRecipeBase::VPWidenEVLSC;
1433
+ }
1434
+
1435
+ static inline bool classof (const VPUser *U) {
1436
+ auto *R = dyn_cast<VPRecipeBase>(U);
1437
+ return R && classof (R);
1438
+ }
1431
1439
1432
1440
// / Produce a widened instruction using the opcode and operands of the recipe,
1433
1441
// / processing State.VF elements.
@@ -1442,6 +1450,8 @@ class VPWidenRecipe : public VPRecipeWithIRFlags {
1442
1450
#endif
1443
1451
};
1444
1452
1453
+ // / A recipe for widening operations with vector-predication intrinsics.with
1454
+ // / explicit vector length (EVL).
1445
1455
class VPWidenEVLRecipe : public VPWidenRecipe {
1446
1456
using VPRecipeWithIRFlags::transferFlags;
1447
1457
@@ -1459,7 +1469,7 @@ class VPWidenEVLRecipe : public VPWidenRecipe {
1459
1469
~VPWidenEVLRecipe () override = default ;
1460
1470
1461
1471
VPWidenRecipe *clone () override final {
1462
- llvm_unreachable (" VPWidenStoreEVLRecipe cannot be cloned" );
1472
+ llvm_unreachable (" VPWidenEVLRecipe cannot be cloned" );
1463
1473
return nullptr ;
1464
1474
}
1465
1475
@@ -2293,7 +2303,7 @@ class VPReductionRecipe : public VPSingleDefRecipe {
2293
2303
// / The Operands are {ChainOp, VecOp, EVL, [Condition]}.
2294
2304
class VPReductionEVLRecipe : public VPReductionRecipe {
2295
2305
public:
2296
- VPReductionEVLRecipe (VPReductionRecipe &R, VPValue *CondOp , VPValue &EVL )
2306
+ VPReductionEVLRecipe (VPReductionRecipe &R, VPValue &EVL , VPValue *CondOp )
2297
2307
: VPReductionRecipe(
2298
2308
VPDef::VPReductionEVLSC, R.getRecurrenceDescriptor(),
2299
2309
cast_or_null<Instruction>(R.getUnderlyingValue()),
@@ -2605,7 +2615,7 @@ struct VPWidenLoadRecipe final : public VPWidenMemoryRecipe, public VPValue {
2605
2615
// / using the address to load from, the explicit vector length and an optional
2606
2616
// / mask.
2607
2617
struct VPWidenLoadEVLRecipe final : public VPWidenMemoryRecipe, public VPValue {
2608
- VPWidenLoadEVLRecipe (VPWidenLoadRecipe &L, VPValue *Mask , VPValue &EVL )
2618
+ VPWidenLoadEVLRecipe (VPWidenLoadRecipe &L, VPValue &EVL , VPValue *Mask )
2609
2619
: VPWidenMemoryRecipe(VPDef::VPWidenLoadEVLSC, L.getIngredient(),
2610
2620
{L.getAddr (), &EVL}, L.isConsecutive(),
2611
2621
L.isReverse(), L.getDebugLoc()),
@@ -2686,7 +2696,7 @@ struct VPWidenStoreRecipe final : public VPWidenMemoryRecipe {
2686
2696
// / using the value to store, the address to store to, the explicit vector
2687
2697
// / length and an optional mask.
2688
2698
struct VPWidenStoreEVLRecipe final : public VPWidenMemoryRecipe {
2689
- VPWidenStoreEVLRecipe (VPWidenStoreRecipe &S, VPValue *Mask , VPValue &EVL )
2699
+ VPWidenStoreEVLRecipe (VPWidenStoreRecipe &S, VPValue &EVL , VPValue *Mask )
2690
2700
: VPWidenMemoryRecipe(VPDef::VPWidenStoreEVLSC, S.getIngredient(),
2691
2701
{S.getAddr (), S.getStoredValue (), &EVL},
2692
2702
S.isConsecutive(), S.isReverse(), S.getDebugLoc()) {
0 commit comments