Skip to content

Commit 06e12b4

Browse files
committed
[RISCV] Add TargetConstraintType=2 to vnclip pseudoinstructions. NFC
These instructions are very similar to narrowing shift instructions which already have this. Remove TargetConstraintType parameter from VPseudoBinaryV_WV class. Only 2 was ever passed to it. Pass 2 directly to the classes instantiated from VPseudoBinaryV_WV instead.
1 parent bfa937a commit 06e12b4

File tree

1 file changed

+18
-12
lines changed

1 file changed

+18
-12
lines changed

llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2422,37 +2422,43 @@ multiclass VPseudoBinaryW_WF_RM<LMULInfo m, FPR_Info f, int sew = 0> {
24222422
// exception from the spec.
24232423
// "The destination EEW is smaller than the source EEW and the overlap is in the
24242424
// lowest-numbered part of the source register group."
2425-
multiclass VPseudoBinaryV_WV<LMULInfo m, int TargetConstraintType = 1> {
2425+
multiclass VPseudoBinaryV_WV<LMULInfo m> {
24262426
defm _WV : VPseudoBinary<m.vrclass, m.wvrclass, m.vrclass, m,
2427-
!if(!ge(m.octuple, 8), "@earlyclobber $rd", ""), TargetConstraintType=TargetConstraintType>;
2427+
!if(!ge(m.octuple, 8), "@earlyclobber $rd", ""),
2428+
TargetConstraintType=2>;
24282429
}
24292430

24302431
multiclass VPseudoBinaryV_WV_RM<LMULInfo m> {
24312432
defm _WV : VPseudoBinaryRoundingMode<m.vrclass, m.wvrclass, m.vrclass, m,
24322433
!if(!ge(m.octuple, 8),
2433-
"@earlyclobber $rd", "")>;
2434+
"@earlyclobber $rd", ""),
2435+
TargetConstraintType=2>;
24342436
}
24352437

2436-
multiclass VPseudoBinaryV_WX<LMULInfo m, int TargetConstraintType = 1> {
2438+
multiclass VPseudoBinaryV_WX<LMULInfo m> {
24372439
defm _WX : VPseudoBinary<m.vrclass, m.wvrclass, GPR, m,
2438-
!if(!ge(m.octuple, 8), "@earlyclobber $rd", ""), TargetConstraintType=TargetConstraintType>;
2440+
!if(!ge(m.octuple, 8), "@earlyclobber $rd", ""),
2441+
TargetConstraintType=2>;
24392442
}
24402443

24412444
multiclass VPseudoBinaryV_WX_RM<LMULInfo m> {
24422445
defm _WX : VPseudoBinaryRoundingMode<m.vrclass, m.wvrclass, GPR, m,
24432446
!if(!ge(m.octuple, 8),
2444-
"@earlyclobber $rd", "")>;
2447+
"@earlyclobber $rd", ""),
2448+
TargetConstraintType=2>;
24452449
}
24462450

2447-
multiclass VPseudoBinaryV_WI<LMULInfo m, int TargetConstraintType = 1> {
2451+
multiclass VPseudoBinaryV_WI<LMULInfo m> {
24482452
defm _WI : VPseudoBinary<m.vrclass, m.wvrclass, uimm5, m,
2449-
!if(!ge(m.octuple, 8), "@earlyclobber $rd", ""), TargetConstraintType=TargetConstraintType>;
2453+
!if(!ge(m.octuple, 8), "@earlyclobber $rd", ""),
2454+
TargetConstraintType=2>;
24502455
}
24512456

24522457
multiclass VPseudoBinaryV_WI_RM<LMULInfo m> {
24532458
defm _WI : VPseudoBinaryRoundingMode<m.vrclass, m.wvrclass, uimm5, m,
24542459
!if(!ge(m.octuple, 8),
2455-
"@earlyclobber $rd", "")>;
2460+
"@earlyclobber $rd", ""),
2461+
TargetConstraintType=2>;
24562462
}
24572463

24582464
// For vadc and vsbc, the instruction encoding is reserved if the destination
@@ -3195,13 +3201,13 @@ multiclass VPseudoVNCLP_WV_WX_WI_RM {
31953201
multiclass VPseudoVNSHT_WV_WX_WI {
31963202
foreach m = MxListW in {
31973203
defvar mx = m.MX;
3198-
defm "" : VPseudoBinaryV_WV<m, TargetConstraintType=2>,
3204+
defm "" : VPseudoBinaryV_WV<m>,
31993205
SchedBinary<"WriteVNShiftV", "ReadVNShiftV", "ReadVNShiftV", mx,
32003206
forceMergeOpRead=true>;
3201-
defm "" : VPseudoBinaryV_WX<m, TargetConstraintType=2>,
3207+
defm "" : VPseudoBinaryV_WX<m>,
32023208
SchedBinary<"WriteVNShiftX", "ReadVNShiftV", "ReadVNShiftX", mx,
32033209
forceMergeOpRead=true>;
3204-
defm "" : VPseudoBinaryV_WI<m, TargetConstraintType=2>,
3210+
defm "" : VPseudoBinaryV_WI<m>,
32053211
SchedUnary<"WriteVNShiftI", "ReadVNShiftV", mx,
32063212
forceMergeOpRead=true>;
32073213
}

0 commit comments

Comments
 (0)