@@ -2136,23 +2136,6 @@ multiclass VPseudoBinaryRoundingMode<VReg RetClass,
2136
2136
}
2137
2137
2138
2138
2139
- multiclass VPseudoBinaryM<VReg RetClass,
2140
- VReg Op1Class,
2141
- DAGOperand Op2Class,
2142
- LMULInfo MInfo,
2143
- string Constraint = "",
2144
- bits<2> TargetConstraintType = 1,
2145
- bit Commutable = 0> {
2146
- let VLMul = MInfo.value, isCommutable = Commutable in {
2147
- def "_" # MInfo.MX : VPseudoBinaryNoMask<RetClass, Op1Class, Op2Class,
2148
- Constraint, TargetConstraintType>;
2149
- let ForceTailAgnostic = true in
2150
- def "_" # MInfo.MX # "_MASK" : VPseudoBinaryMOutMask<RetClass, Op1Class,
2151
- Op2Class, Constraint, TargetConstraintType>,
2152
- RISCVMaskedPseudo<MaskIdx=3>;
2153
- }
2154
- }
2155
-
2156
2139
multiclass VPseudoBinaryEmul<VReg RetClass,
2157
2140
VReg Op1Class,
2158
2141
DAGOperand Op2Class,
@@ -2633,28 +2616,35 @@ multiclass PseudoVEXT_VF8 {
2633
2616
// lowest-numbered part of the source register group".
2634
2617
// With LMUL<=1 the source and dest occupy a single register so any overlap
2635
2618
// is in the lowest-numbered part.
2636
- multiclass VPseudoBinaryM_VV<LMULInfo m, bits<2> TargetConstraintType = 1,
2637
- bit Commutable = 0> {
2638
- defm _VV : VPseudoBinaryM<VR, m.vrclass, m.vrclass, m,
2619
+ multiclass VPseudoBinaryM<DAGOperand Op2Class, LMULInfo m, bit Commutable = 0> {
2620
+ let VLMul = m.value, isCommutable = Commutable in {
2621
+ def "_" # m.MX :
2622
+ VPseudoBinaryNoMask<VR, m.vrclass, Op2Class,
2623
+ !if(!ge(m.octuple, 16), "@earlyclobber $rd", ""),
2624
+ TargetConstraintType = 2>;
2625
+ let ForceTailAgnostic = true in
2626
+ def "_" # m.MX # "_MASK" :
2627
+ VPseudoBinaryMOutMask<VR, m.vrclass, Op2Class,
2639
2628
!if(!ge(m.octuple, 16), "@earlyclobber $rd", ""),
2640
- TargetConstraintType, Commutable=Commutable>;
2629
+ TargetConstraintType = 2>,
2630
+ RISCVMaskedPseudo<MaskIdx=3>;
2631
+ }
2641
2632
}
2642
2633
2643
- multiclass VPseudoBinaryM_VX<LMULInfo m, bits<2> TargetConstraintType = 1> {
2644
- defm "_VX" :
2645
- VPseudoBinaryM<VR, m.vrclass, GPR, m,
2646
- !if(!ge(m.octuple, 16), "@earlyclobber $rd", ""), TargetConstraintType>;
2634
+ multiclass VPseudoBinaryM_VV<LMULInfo m, bit Commutable = 0> {
2635
+ defm _VV : VPseudoBinaryM<m.vrclass, m, Commutable=Commutable>;
2647
2636
}
2648
2637
2649
- multiclass VPseudoBinaryM_VF<LMULInfo m, FPR_Info f, bits<2> TargetConstraintType = 1> {
2650
- defm "_V" # f.FX :
2651
- VPseudoBinaryM<VR, m.vrclass, f.fprclass, m,
2652
- !if(!ge(m.octuple, 16), "@earlyclobber $rd", ""), TargetConstraintType>;
2638
+ multiclass VPseudoBinaryM_VX<LMULInfo m> {
2639
+ defm _VX : VPseudoBinaryM<GPR, m>;
2653
2640
}
2654
2641
2655
- multiclass VPseudoBinaryM_VI<LMULInfo m, bits<2> TargetConstraintType = 1> {
2656
- defm _VI : VPseudoBinaryM<VR, m.vrclass, simm5, m,
2657
- !if(!ge(m.octuple, 16), "@earlyclobber $rd", ""), TargetConstraintType>;
2642
+ multiclass VPseudoBinaryM_VF<LMULInfo m, FPR_Info f> {
2643
+ defm "_V" # f.FX : VPseudoBinaryM<f.fprclass, m>;
2644
+ }
2645
+
2646
+ multiclass VPseudoBinaryM_VI<LMULInfo m> {
2647
+ defm _VI : VPseudoBinaryM<simm5, m>;
2658
2648
}
2659
2649
2660
2650
multiclass VPseudoVGTR_VV_VX_VI {
@@ -3397,34 +3387,44 @@ multiclass VPseudoVWMAC_VV_VF_BF_RM {
3397
3387
multiclass VPseudoVCMPM_VV_VX_VI<bit Commutable = 0> {
3398
3388
foreach m = MxList in {
3399
3389
defvar mx = m.MX;
3400
- defm "" : VPseudoBinaryM_VV<m, TargetConstraintType=2, Commutable=Commutable>,
3390
+ defm "" : VPseudoBinaryM_VV<m, Commutable=Commutable>,
3401
3391
SchedBinary<"WriteVICmpV", "ReadVICmpV", "ReadVICmpV", mx>;
3402
- defm "" : VPseudoBinaryM_VX<m, TargetConstraintType=2 >,
3392
+ defm "" : VPseudoBinaryM_VX<m>,
3403
3393
SchedBinary<"WriteVICmpX", "ReadVICmpV", "ReadVICmpX", mx>;
3404
- defm "" : VPseudoBinaryM_VI<m, TargetConstraintType=2 >,
3394
+ defm "" : VPseudoBinaryM_VI<m>,
3405
3395
SchedUnary<"WriteVICmpI", "ReadVICmpV", mx>;
3406
3396
}
3407
3397
}
3408
3398
3409
3399
multiclass VPseudoVCMPM_VV_VX {
3410
3400
foreach m = MxList in {
3411
3401
defvar mx = m.MX;
3412
- defm "" : VPseudoBinaryM_VV<m, TargetConstraintType=2 >,
3402
+ defm "" : VPseudoBinaryM_VV<m>,
3413
3403
SchedBinary<"WriteVICmpV", "ReadVICmpV", "ReadVICmpV", mx>;
3414
- defm "" : VPseudoBinaryM_VX<m, TargetConstraintType=2>,
3404
+ defm "" : VPseudoBinaryM_VX<m>,
3405
+ SchedBinary<"WriteVICmpX", "ReadVICmpV", "ReadVICmpX", mx>;
3406
+ }
3407
+ }
3408
+
3409
+ multiclass VPseudoVCMPM_VX_VI {
3410
+ foreach m = MxList in {
3411
+ defvar mx = m.MX;
3412
+ defm "" : VPseudoBinaryM_VX<m>,
3415
3413
SchedBinary<"WriteVICmpX", "ReadVICmpV", "ReadVICmpX", mx>;
3414
+ defm "" : VPseudoBinaryM_VI<m>,
3415
+ SchedUnary<"WriteVICmpI", "ReadVICmpV", mx>;
3416
3416
}
3417
3417
}
3418
3418
3419
3419
multiclass VPseudoVCMPM_VV_VF {
3420
3420
foreach m = MxListF in {
3421
- defm "" : VPseudoBinaryM_VV<m, TargetConstraintType=2 >,
3421
+ defm "" : VPseudoBinaryM_VV<m>,
3422
3422
SchedBinary<"WriteVFCmpV", "ReadVFCmpV", "ReadVFCmpV", m.MX>;
3423
3423
}
3424
3424
3425
3425
foreach f = FPList in {
3426
3426
foreach m = f.MxList in {
3427
- defm "" : VPseudoBinaryM_VF<m, f, TargetConstraintType=2 >,
3427
+ defm "" : VPseudoBinaryM_VF<m, f>,
3428
3428
SchedBinary<"WriteVFCmpF", "ReadVFCmpV", "ReadVFCmpF", m.MX>;
3429
3429
}
3430
3430
}
@@ -3433,22 +3433,12 @@ multiclass VPseudoVCMPM_VV_VF {
3433
3433
multiclass VPseudoVCMPM_VF {
3434
3434
foreach f = FPList in {
3435
3435
foreach m = f.MxList in {
3436
- defm "" : VPseudoBinaryM_VF<m, f, TargetConstraintType=2 >,
3436
+ defm "" : VPseudoBinaryM_VF<m, f>,
3437
3437
SchedBinary<"WriteVFCmpF", "ReadVFCmpV", "ReadVFCmpF", m.MX>;
3438
3438
}
3439
3439
}
3440
3440
}
3441
3441
3442
- multiclass VPseudoVCMPM_VX_VI {
3443
- foreach m = MxList in {
3444
- defvar mx = m.MX;
3445
- defm "" : VPseudoBinaryM_VX<m, TargetConstraintType=2>,
3446
- SchedBinary<"WriteVICmpX", "ReadVICmpV", "ReadVICmpX", mx>;
3447
- defm "" : VPseudoBinaryM_VI<m, TargetConstraintType=2>,
3448
- SchedUnary<"WriteVICmpI", "ReadVICmpV", mx>;
3449
- }
3450
- }
3451
-
3452
3442
multiclass VPseudoVRED_VS {
3453
3443
foreach m = MxList in {
3454
3444
defvar mx = m.MX;
0 commit comments