@@ -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
@@ -2319,7 +2329,7 @@ class VPReductionRecipe : public VPSingleDefRecipe {
2319
2329
// / The Operands are {ChainOp, VecOp, EVL, [Condition]}.
2320
2330
class VPReductionEVLRecipe : public VPReductionRecipe {
2321
2331
public:
2322
- VPReductionEVLRecipe (VPReductionRecipe &R, VPValue *CondOp , VPValue &EVL )
2332
+ VPReductionEVLRecipe (VPReductionRecipe &R, VPValue &EVL , VPValue *CondOp )
2323
2333
: VPReductionRecipe(
2324
2334
VPDef::VPReductionEVLSC, R.getRecurrenceDescriptor(),
2325
2335
cast_or_null<Instruction>(R.getUnderlyingValue()),
@@ -2635,7 +2645,7 @@ struct VPWidenLoadRecipe final : public VPWidenMemoryRecipe, public VPValue {
2635
2645
// / using the address to load from, the explicit vector length and an optional
2636
2646
// / mask.
2637
2647
struct VPWidenLoadEVLRecipe final : public VPWidenMemoryRecipe, public VPValue {
2638
- VPWidenLoadEVLRecipe (VPWidenLoadRecipe &L, VPValue *Mask , VPValue &EVL )
2648
+ VPWidenLoadEVLRecipe (VPWidenLoadRecipe &L, VPValue &EVL , VPValue *Mask )
2639
2649
: VPWidenMemoryRecipe(VPDef::VPWidenLoadEVLSC, L.getIngredient(),
2640
2650
{L.getAddr (), &EVL}, L.isConsecutive(),
2641
2651
L.isReverse(), L.getDebugLoc()),
@@ -2716,7 +2726,7 @@ struct VPWidenStoreRecipe final : public VPWidenMemoryRecipe {
2716
2726
// / using the value to store, the address to store to, the explicit vector
2717
2727
// / length and an optional mask.
2718
2728
struct VPWidenStoreEVLRecipe final : public VPWidenMemoryRecipe {
2719
- VPWidenStoreEVLRecipe (VPWidenStoreRecipe &S, VPValue *Mask , VPValue &EVL )
2729
+ VPWidenStoreEVLRecipe (VPWidenStoreRecipe &S, VPValue &EVL , VPValue *Mask )
2720
2730
: VPWidenMemoryRecipe(VPDef::VPWidenStoreEVLSC, S.getIngredient(),
2721
2731
{S.getAddr (), S.getStoredValue (), &EVL},
2722
2732
S.isConsecutive(), S.isReverse(), S.getDebugLoc()) {
0 commit comments