[llvm] r327435 - [x86] add test for WriteZero sched class instructions; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 13 12:20:01 PDT 2018
Author: spatel
Date: Tue Mar 13 12:20:01 2018
New Revision: 327435
URL: http://llvm.org/viewvc/llvm-project?rev=327435&view=rev
Log:
[x86] add test for WriteZero sched class instructions; NFC
Nops should have zero latency because there is no result.
Idioms like 'xorps xmm0, xmm0' may have zero latency because
they are handled without using an execution unit.
Modified:
llvm/trunk/test/CodeGen/X86/sse-schedule.ll
Modified: llvm/trunk/test/CodeGen/X86/sse-schedule.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/sse-schedule.ll?rev=327435&r1=327434&r2=327435&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/sse-schedule.ll (original)
+++ llvm/trunk/test/CodeGen/X86/sse-schedule.ll Tue Mar 13 12:20:01 2018
@@ -3763,4 +3763,96 @@ define <4 x float> @test_xorps(<4 x floa
ret <4 x float> %7
}
+; 'WriteZero' class instructions.
+
+define <4 x float> @test_fnop() nounwind {
+; GENERIC-LABEL: test_fnop:
+; GENERIC: # %bb.0:
+; GENERIC-NEXT: #APP
+; GENERIC-NEXT: nop # sched: [1:?]
+; GENERIC-NEXT: #NO_APP
+; GENERIC-NEXT: xorps %xmm0, %xmm0 # sched: [1:1.00]
+; GENERIC-NEXT: retq # sched: [1:1.00]
+;
+; ATOM-LABEL: test_fnop:
+; ATOM: # %bb.0:
+; ATOM-NEXT: xorps %xmm0, %xmm0 # sched: [1:0.50]
+; ATOM-NEXT: #APP
+; ATOM-NEXT: nop # sched: [1:0.50]
+; ATOM-NEXT: #NO_APP
+; ATOM-NEXT: nop # sched: [1:0.50]
+; ATOM-NEXT: nop # sched: [1:0.50]
+; ATOM-NEXT: nop # sched: [1:0.50]
+; ATOM-NEXT: nop # sched: [1:0.50]
+; ATOM-NEXT: nop # sched: [1:0.50]
+; ATOM-NEXT: nop # sched: [1:0.50]
+; ATOM-NEXT: retq # sched: [79:39.50]
+;
+; SLM-LABEL: test_fnop:
+; SLM: # %bb.0:
+; SLM-NEXT: xorps %xmm0, %xmm0 # sched: [1:0.50]
+; SLM-NEXT: #APP
+; SLM-NEXT: nop # sched: [1:?]
+; SLM-NEXT: #NO_APP
+; SLM-NEXT: retq # sched: [4:1.00]
+;
+; SANDY-LABEL: test_fnop:
+; SANDY: # %bb.0:
+; SANDY-NEXT: #APP
+; SANDY-NEXT: nop # sched: [1:?]
+; SANDY-NEXT: #NO_APP
+; SANDY-NEXT: vxorps %xmm0, %xmm0, %xmm0 # sched: [1:1.00]
+; SANDY-NEXT: retq # sched: [1:1.00]
+;
+; HASWELL-LABEL: test_fnop:
+; HASWELL: # %bb.0:
+; HASWELL-NEXT: #APP
+; HASWELL-NEXT: nop # sched: [1:0.25]
+; HASWELL-NEXT: #NO_APP
+; HASWELL-NEXT: vxorps %xmm0, %xmm0, %xmm0 # sched: [1:1.00]
+; HASWELL-NEXT: retq # sched: [7:1.00]
+;
+; BROADWELL-LABEL: test_fnop:
+; BROADWELL: # %bb.0:
+; BROADWELL-NEXT: #APP
+; BROADWELL-NEXT: nop # sched: [1:0.25]
+; BROADWELL-NEXT: #NO_APP
+; BROADWELL-NEXT: vxorps %xmm0, %xmm0, %xmm0 # sched: [1:1.00]
+; BROADWELL-NEXT: retq # sched: [7:1.00]
+;
+; SKYLAKE-LABEL: test_fnop:
+; SKYLAKE: # %bb.0:
+; SKYLAKE-NEXT: #APP
+; SKYLAKE-NEXT: nop # sched: [1:0.25]
+; SKYLAKE-NEXT: #NO_APP
+; SKYLAKE-NEXT: vxorps %xmm0, %xmm0, %xmm0 # sched: [1:0.33]
+; SKYLAKE-NEXT: retq # sched: [7:1.00]
+;
+; SKX-LABEL: test_fnop:
+; SKX: # %bb.0:
+; SKX-NEXT: #APP
+; SKX-NEXT: nop # sched: [1:0.25]
+; SKX-NEXT: #NO_APP
+; SKX-NEXT: vxorps %xmm0, %xmm0, %xmm0 # sched: [1:0.33]
+; SKX-NEXT: retq # sched: [7:1.00]
+;
+; BTVER2-LABEL: test_fnop:
+; BTVER2: # %bb.0:
+; BTVER2-NEXT: vxorps %xmm0, %xmm0, %xmm0 # sched: [1:0.50]
+; BTVER2-NEXT: #APP
+; BTVER2-NEXT: nop # sched: [1:?]
+; BTVER2-NEXT: #NO_APP
+; BTVER2-NEXT: retq # sched: [4:1.00]
+;
+; ZNVER1-LABEL: test_fnop:
+; ZNVER1: # %bb.0:
+; ZNVER1-NEXT: vxorps %xmm0, %xmm0, %xmm0 # sched: [1:0.25]
+; ZNVER1-NEXT: #APP
+; ZNVER1-NEXT: nop # sched: [1:?]
+; ZNVER1-NEXT: #NO_APP
+; ZNVER1-NEXT: retq # sched: [1:0.50]
+ tail call void asm sideeffect "nop", ""() nounwind
+ ret <4 x float> zeroinitializer
+}
+
!0 = !{i32 1}
More information about the llvm-commits
mailing list