From 53411c82a983138b8a2a03194694ac12b71a26a4 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Mon, 5 Dec 2022 21:12:07 +0000 Subject: [PATCH] [X86] Remove unnecessary x87 overrides from znver1/znver2 model Reported by D138359 - the overrides matched the base class schedule WriteMicrocoded definition --- llvm/lib/Target/X86/X86ScheduleZnver1.td | 37 -------------------------------- llvm/lib/Target/X86/X86ScheduleZnver2.td | 37 -------------------------------- 2 files changed, 74 deletions(-) diff --git a/llvm/lib/Target/X86/X86ScheduleZnver1.td b/llvm/lib/Target/X86/X86ScheduleZnver1.td index 124a8a71..41ecce1 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; // 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 aa7b0df..5905a66 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; // 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]> ; -- 2.7.4