[llvm] r319184 - [X86][X87] Tag FTST x87 instruction scheduler class
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 28 08:57:21 PST 2017
Author: rksimon
Date: Tue Nov 28 08:57:20 2017
New Revision: 319184
URL: http://llvm.org/viewvc/llvm-project?rev=319184&view=rev
Log:
[X86][X87] Tag FTST x87 instruction scheduler class
Looking through Agner, FTST is very similar to generic float compare behaviour, so I've added them to the existing IIC_FCOMI (WriteFAdd) tags.
Modified:
llvm/trunk/lib/Target/X86/X86InstrFPStack.td
llvm/trunk/test/CodeGen/X86/x87-schedule.ll
Modified: llvm/trunk/lib/Target/X86/X86InstrFPStack.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrFPStack.td?rev=319184&r1=319183&r2=319184&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrFPStack.td (original)
+++ llvm/trunk/lib/Target/X86/X86InstrFPStack.td Tue Nov 28 08:57:20 2017
@@ -327,7 +327,8 @@ def TST_Fp64 : FpIf64<(outs), (ins RFP6
def TST_Fp80 : FpI_<(outs), (ins RFP80:$src), OneArgFP, []>;
} // hasSideEffects
-def TST_F : FPI<0xD9, MRM_E4, (outs), (ins), "ftst">;
+let SchedRW = [WriteFAdd] in
+def TST_F : FPI<0xD9, MRM_E4, (outs), (ins), "ftst", IIC_FCOMI>;
} // Defs = [FPSW]
// Versions of FP instructions that take a single memory operand. Added for the
Modified: llvm/trunk/test/CodeGen/X86/x87-schedule.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/x87-schedule.ll?rev=319184&r1=319183&r2=319184&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/x87-schedule.ll (original)
+++ llvm/trunk/test/CodeGen/X86/x87-schedule.ll Tue Nov 28 08:57:20 2017
@@ -3778,21 +3778,21 @@ define void @test_ftst() optsize {
; ATOM-LABEL: test_ftst:
; ATOM: # BB#0:
; ATOM-NEXT: #APP
-; ATOM-NEXT: ftst
+; ATOM-NEXT: ftst # sched: [9:4.50]
; ATOM-NEXT: #NO_APP
; ATOM-NEXT: retl # sched: [79:39.50]
;
; SLM-LABEL: test_ftst:
; SLM: # BB#0:
; SLM-NEXT: #APP
-; SLM-NEXT: ftst
+; SLM-NEXT: ftst # sched: [3:1.00]
; SLM-NEXT: #NO_APP
; SLM-NEXT: retl # sched: [4:1.00]
;
; SANDY-LABEL: test_ftst:
; SANDY: # BB#0:
; SANDY-NEXT: #APP
-; SANDY-NEXT: ftst
+; SANDY-NEXT: ftst # sched: [3:1.00]
; SANDY-NEXT: #NO_APP
; SANDY-NEXT: retl # sched: [5:1.00]
;
@@ -3806,28 +3806,28 @@ define void @test_ftst() optsize {
; BROADWELL-LABEL: test_ftst:
; BROADWELL: # BB#0:
; BROADWELL-NEXT: #APP
-; BROADWELL-NEXT: ftst
+; BROADWELL-NEXT: ftst # sched: [3:1.00]
; BROADWELL-NEXT: #NO_APP
; BROADWELL-NEXT: retl # sched: [6:0.50]
;
; SKYLAKE-LABEL: test_ftst:
; SKYLAKE: # BB#0:
; SKYLAKE-NEXT: #APP
-; SKYLAKE-NEXT: ftst
+; SKYLAKE-NEXT: ftst # sched: [3:1.00]
; SKYLAKE-NEXT: #NO_APP
; SKYLAKE-NEXT: retl # sched: [6:0.50]
;
; SKX-LABEL: test_ftst:
; SKX: # BB#0:
; SKX-NEXT: #APP
-; SKX-NEXT: ftst
+; SKX-NEXT: ftst # sched: [3:1.00]
; SKX-NEXT: #NO_APP
; SKX-NEXT: retl # sched: [6:0.50]
;
; BTVER2-LABEL: test_ftst:
; BTVER2: # BB#0:
; BTVER2-NEXT: #APP
-; BTVER2-NEXT: ftst
+; BTVER2-NEXT: ftst # sched: [3:1.00]
; BTVER2-NEXT: #NO_APP
; BTVER2-NEXT: retl # sched: [4:1.00]
;
More information about the llvm-commits
mailing list