[llvm] 53411c8 - [X86] Remove unnecessary x87 overrides from znver1/znver2 model
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 5 13:21:21 PST 2022
Author: Simon Pilgrim
Date: 2022-12-05T21:19:42Z
New Revision: 53411c82a983138b8a2a03194694ac12b71a26a4
URL: https://github.com/llvm/llvm-project/commit/53411c82a983138b8a2a03194694ac12b71a26a4
DIFF: https://github.com/llvm/llvm-project/commit/53411c82a983138b8a2a03194694ac12b71a26a4.diff
LOG: [X86] Remove unnecessary x87 overrides from znver1/znver2 model
Reported by D138359 - the overrides matched the base class schedule WriteMicrocoded definition
Added:
Modified:
llvm/lib/Target/X86/X86ScheduleZnver1.td
llvm/lib/Target/X86/X86ScheduleZnver2.td
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86ScheduleZnver1.td b/llvm/lib/Target/X86/X86ScheduleZnver1.td
index 124a8a71b9a7a..41ecce1fe7fca 100644
--- a/llvm/lib/Target/X86/X86ScheduleZnver1.td
+++ b/llvm/lib/Target/X86/X86ScheduleZnver1.td
@@ -777,9 +777,6 @@ def ZnWriteLD_F80m : SchedWriteRes<[ZnAGU, ZnFPU13]> {
}
def : InstRW<[ZnWriteLD_F80m], (instrs LD_F80m)>;
-// FBLD.
-def : InstRW<[WriteMicrocoded], (instrs FBLDm)>;
-
// FST(P).
// r.
def : InstRW<[ZnWriteSTr], (instregex "ST_(F|FP)rr")>;
@@ -790,10 +787,6 @@ def ZnWriteST_FP80m : SchedWriteRes<[ZnAGU, ZnFPU23]> {
}
def : InstRW<[ZnWriteST_FP80m], (instrs ST_FP80m)>;
-// FBSTP.
-// m80.
-def : InstRW<[WriteMicrocoded], (instrs FBSTPm)>;
-
def ZnWriteFXCH : SchedWriteRes<[ZnFPU]>;
// FXCHG.
@@ -833,9 +826,6 @@ def : SchedAlias<WriteFLDC, ZnWriteFPU3>;
// AX.
def : InstRW<[WriteMicrocoded], (instrs FNSTSW16r)>;
-// m16.
-def : InstRW<[WriteMicrocoded], (instrs FNSTSWm)>;
-
// FLDCW.
def : InstRW<[WriteMicrocoded], (instrs FLDCW16m)>;
@@ -848,12 +838,6 @@ def : InstRW<[ZnWriteFPU3], (instrs FINCSTP, FDECSTP)>;
// FFREE.
def : InstRW<[ZnWriteFPU3], (instregex "FFREE")>;
-// FNSAVE.
-def : InstRW<[WriteMicrocoded], (instrs FSAVEm)>;
-
-// FRSTOR.
-def : InstRW<[WriteMicrocoded], (instrs FRSTORm)>;
-
//-- Arithmetic instructions --//
def ZnWriteFPU3Lat1 : SchedWriteRes<[ZnFPU3]> ;
@@ -902,33 +886,12 @@ def : InstRW<[ZnWriteFPU0Lat1], (instregex "TST_F")>;
// FXAM.
def : InstRW<[ZnWriteFPU3Lat1], (instrs XAM_F)>;
-// FPREM.
-def : InstRW<[WriteMicrocoded], (instrs FPREM)>;
-
-// FPREM1.
-def : InstRW<[WriteMicrocoded], (instrs FPREM1)>;
-
-// FRNDINT.
-def : InstRW<[WriteMicrocoded], (instrs FRNDINT)>;
-
-// FSCALE.
-def : InstRW<[WriteMicrocoded], (instrs FSCALE)>;
-
-// FXTRACT.
-def : InstRW<[WriteMicrocoded], (instrs FXTRACT)>;
-
// FNOP.
def : InstRW<[ZnWriteFPU0Lat1], (instrs FNOP)>;
// WAIT.
def : InstRW<[ZnWriteFPU0Lat1], (instrs WAIT)>;
-// FNCLEX.
-def : InstRW<[WriteMicrocoded], (instrs FNCLEX)>;
-
-// FNINIT.
-def : InstRW<[WriteMicrocoded], (instrs FNINIT)>;
-
//=== Integer MMX and XMM Instructions ===//
def ZnWriteFPU013 : SchedWriteRes<[ZnFPU013]> ;
diff --git a/llvm/lib/Target/X86/X86ScheduleZnver2.td b/llvm/lib/Target/X86/X86ScheduleZnver2.td
index aa7b0df0b5bcc..5905a66c45306 100644
--- a/llvm/lib/Target/X86/X86ScheduleZnver2.td
+++ b/llvm/lib/Target/X86/X86ScheduleZnver2.td
@@ -787,9 +787,6 @@ def Zn2WriteLD_F80m : SchedWriteRes<[Zn2AGU, Zn2FPU13]> {
}
def : InstRW<[Zn2WriteLD_F80m], (instrs LD_F80m)>;
-// FBLD.
-def : InstRW<[WriteMicrocoded], (instrs FBLDm)>;
-
// FST(P).
// r.
def : InstRW<[Zn2WriteSTr], (instregex "ST_(F|FP)rr")>;
@@ -800,10 +797,6 @@ def Zn2WriteST_FP80m : SchedWriteRes<[Zn2AGU, Zn2FPU23]> {
}
def : InstRW<[Zn2WriteST_FP80m], (instrs ST_FP80m)>;
-// FBSTP.
-// m80.
-def : InstRW<[WriteMicrocoded], (instrs FBSTPm)>;
-
def Zn2WriteFXCH : SchedWriteRes<[Zn2FPU]>;
// FXCHG.
@@ -843,9 +836,6 @@ def : SchedAlias<WriteFLDC, Zn2WriteFPU3>;
// AX.
def : InstRW<[WriteMicrocoded], (instrs FNSTSW16r)>;
-// m16.
-def : InstRW<[WriteMicrocoded], (instrs FNSTSWm)>;
-
// FLDCW.
def : InstRW<[WriteMicrocoded], (instrs FLDCW16m)>;
@@ -858,12 +848,6 @@ def : InstRW<[Zn2WriteFPU3], (instrs FINCSTP, FDECSTP)>;
// FFREE.
def : InstRW<[Zn2WriteFPU3], (instregex "FFREE")>;
-// FNSAVE.
-def : InstRW<[WriteMicrocoded], (instrs FSAVEm)>;
-
-// FRSTOR.
-def : InstRW<[WriteMicrocoded], (instrs FRSTORm)>;
-
//-- Arithmetic instructions --//
def Zn2WriteFPU3Lat1 : SchedWriteRes<[Zn2FPU3]> ;
@@ -912,33 +896,12 @@ def : InstRW<[Zn2WriteFPU0Lat1], (instregex "TST_F")>;
// FXAM.
def : InstRW<[Zn2WriteFPU3Lat1], (instrs XAM_F)>;
-// FPREM.
-def : InstRW<[WriteMicrocoded], (instrs FPREM)>;
-
-// FPREM1.
-def : InstRW<[WriteMicrocoded], (instrs FPREM1)>;
-
-// FRNDINT.
-def : InstRW<[WriteMicrocoded], (instrs FRNDINT)>;
-
-// FSCALE.
-def : InstRW<[WriteMicrocoded], (instrs FSCALE)>;
-
-// FXTRACT.
-def : InstRW<[WriteMicrocoded], (instrs FXTRACT)>;
-
// FNOP.
def : InstRW<[Zn2WriteFPU0Lat1], (instrs FNOP)>;
// WAIT.
def : InstRW<[Zn2WriteFPU0Lat1], (instrs WAIT)>;
-// FNCLEX.
-def : InstRW<[WriteMicrocoded], (instrs FNCLEX)>;
-
-// FNINIT.
-def : InstRW<[WriteMicrocoded], (instrs FNINIT)>;
-
//=== Integer MMX and XMM Instructions ===//
def Zn2WriteFPU013 : SchedWriteRes<[Zn2FPU013]> ;
More information about the llvm-commits
mailing list