Skip to content

Commit 403d2a4

Browse files
michaelmaitlandAndrés Villegas
authored andcommitted
[RISCV] Split VFWREDUSUM and VFWREDOSUM SchedWrite (llvm#65386)
WriteVFWRedOV_From and WriteVFWRedV_From SchedWrite classes exist already, but no pseudos were using the ordered SchedWrite. This change makes it so that the VFWREDOSUM pseudo used the ordered VFW SchedWrite.
1 parent 6a817a9 commit 403d2a4

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3518,6 +3518,18 @@ multiclass VPseudoVFWRED_VS_RM {
35183518
}
35193519
}
35203520

3521+
multiclass VPseudoVFWREDO_VS_RM {
3522+
foreach m = MxListFWRed in {
3523+
defvar mx = m.MX;
3524+
foreach e = SchedSEWSet<mx, isF=1, isWidening=1>.val in {
3525+
defm _VS
3526+
: VPseudoTernaryWithTailPolicyRoundingMode<V_M1.vrclass, m.vrclass,
3527+
V_M1.vrclass, m, e>,
3528+
SchedReduction<"WriteVFWRedOV_From", "ReadVFWRedV", mx, e>;
3529+
}
3530+
}
3531+
}
3532+
35213533
multiclass VPseudoConversion<VReg RetClass,
35223534
VReg Op1Class,
35233535
LMULInfo MInfo,
@@ -6601,7 +6613,7 @@ let IsRVVWideningReduction = 1,
66016613
hasSideEffects = 0,
66026614
mayRaiseFPException = true in {
66036615
defm PseudoVFWREDUSUM : VPseudoVFWRED_VS_RM;
6604-
defm PseudoVFWREDOSUM : VPseudoVFWRED_VS_RM;
6616+
defm PseudoVFWREDOSUM : VPseudoVFWREDO_VS_RM;
66056617
}
66066618

66076619
} // Predicates = [HasVInstructionsAnyF]

0 commit comments

Comments
 (0)