@@ -1431,7 +1431,15 @@ class VPWidenRecipe : public VPRecipeWithIRFlags {
1431
1431
return R;
1432
1432
}
1433
1433
1434
- VP_CLASSOF_IMPL (VPDef::VPWidenSC)
1434
+ static inline bool classof (const VPRecipeBase *R) {
1435
+ return R->getVPDefID () == VPRecipeBase::VPWidenSC ||
1436
+ R->getVPDefID () == VPRecipeBase::VPWidenEVLSC;
1437
+ }
1438
+
1439
+ static inline bool classof (const VPUser *U) {
1440
+ auto *R = dyn_cast<VPRecipeBase>(U);
1441
+ return R && classof (R);
1442
+ }
1435
1443
1436
1444
// / Produce a widened instruction using the opcode and operands of the recipe,
1437
1445
// / processing State.VF elements.
@@ -1450,6 +1458,8 @@ class VPWidenRecipe : public VPRecipeWithIRFlags {
1450
1458
#endif
1451
1459
};
1452
1460
1461
+ // / A recipe for widening operations with vector-predication intrinsics.with
1462
+ // / explicit vector length (EVL).
1453
1463
class VPWidenEVLRecipe : public VPWidenRecipe {
1454
1464
using VPRecipeWithIRFlags::transferFlags;
1455
1465
@@ -1467,7 +1477,7 @@ class VPWidenEVLRecipe : public VPWidenRecipe {
1467
1477
~VPWidenEVLRecipe () override = default ;
1468
1478
1469
1479
VPWidenRecipe *clone () override final {
1470
- llvm_unreachable (" VPWidenStoreEVLRecipe cannot be cloned" );
1480
+ llvm_unreachable (" VPWidenEVLRecipe cannot be cloned" );
1471
1481
return nullptr ;
1472
1482
}
1473
1483
@@ -2309,7 +2319,7 @@ class VPReductionRecipe : public VPSingleDefRecipe {
2309
2319
// / The Operands are {ChainOp, VecOp, EVL, [Condition]}.
2310
2320
class VPReductionEVLRecipe : public VPReductionRecipe {
2311
2321
public:
2312
- VPReductionEVLRecipe (VPReductionRecipe &R, VPValue *CondOp , VPValue &EVL )
2322
+ VPReductionEVLRecipe (VPReductionRecipe &R, VPValue &EVL , VPValue *CondOp )
2313
2323
: VPReductionRecipe(
2314
2324
VPDef::VPReductionEVLSC, R.getRecurrenceDescriptor(),
2315
2325
cast_or_null<Instruction>(R.getUnderlyingValue()),
@@ -2621,7 +2631,7 @@ struct VPWidenLoadRecipe final : public VPWidenMemoryRecipe, public VPValue {
2621
2631
// / using the address to load from, the explicit vector length and an optional
2622
2632
// / mask.
2623
2633
struct VPWidenLoadEVLRecipe final : public VPWidenMemoryRecipe, public VPValue {
2624
- VPWidenLoadEVLRecipe (VPWidenLoadRecipe &L, VPValue *Mask , VPValue &EVL )
2634
+ VPWidenLoadEVLRecipe (VPWidenLoadRecipe &L, VPValue &EVL , VPValue *Mask )
2625
2635
: VPWidenMemoryRecipe(VPDef::VPWidenLoadEVLSC, L.getIngredient(),
2626
2636
{L.getAddr (), &EVL}, L.isConsecutive(),
2627
2637
L.isReverse(), L.getDebugLoc()),
@@ -2702,7 +2712,7 @@ struct VPWidenStoreRecipe final : public VPWidenMemoryRecipe {
2702
2712
// / using the value to store, the address to store to, the explicit vector
2703
2713
// / length and an optional mask.
2704
2714
struct VPWidenStoreEVLRecipe final : public VPWidenMemoryRecipe {
2705
- VPWidenStoreEVLRecipe (VPWidenStoreRecipe &S, VPValue *Mask , VPValue &EVL )
2715
+ VPWidenStoreEVLRecipe (VPWidenStoreRecipe &S, VPValue &EVL , VPValue *Mask )
2706
2716
: VPWidenMemoryRecipe(VPDef::VPWidenStoreEVLSC, S.getIngredient(),
2707
2717
{S.getAddr (), S.getStoredValue (), &EVL},
2708
2718
S.isConsecutive(), S.isReverse(), S.getDebugLoc()) {
0 commit comments