[llvm] r320598 - [X86] Add POP/PUSH schedule tests
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 13 09:42:25 PST 2017
Author: rksimon
Date: Wed Dec 13 09:42:25 2017
New Revision: 320598
URL: http://llvm.org/viewvc/llvm-project?rev=320598&view=rev
Log:
[X86] Add POP/PUSH schedule tests
Modified:
llvm/trunk/test/CodeGen/X86/schedule-x86_32.ll
llvm/trunk/test/CodeGen/X86/schedule-x86_64.ll
Modified: llvm/trunk/test/CodeGen/X86/schedule-x86_32.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/schedule-x86_32.ll?rev=320598&r1=320597&r2=320598&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/schedule-x86_32.ll (original)
+++ llvm/trunk/test/CodeGen/X86/schedule-x86_32.ll Wed Dec 13 09:42:25 2017
@@ -1335,6 +1335,588 @@ define void @test_leave() optsize {
ret void
}
+define void @test_pop_push() optsize {
+; GENERIC-LABEL: test_pop_push:
+; GENERIC: # %bb.0:
+; GENERIC-NEXT: #APP
+; GENERIC-NEXT: popl %ds
+; GENERIC-NEXT: popl %es
+; GENERIC-NEXT: popl %ss
+; GENERIC-NEXT: popl %fs
+; GENERIC-NEXT: popl %gs
+; GENERIC-NEXT: pushl %cs
+; GENERIC-NEXT: pushl %ds
+; GENERIC-NEXT: pushl %es
+; GENERIC-NEXT: pushl %ss
+; GENERIC-NEXT: pushl %fs
+; GENERIC-NEXT: pushl %gs
+; GENERIC-NEXT: #NO_APP
+; GENERIC-NEXT: retl
+;
+; ATOM-LABEL: test_pop_push:
+; ATOM: # %bb.0:
+; ATOM-NEXT: #APP
+; ATOM-NEXT: popl %ds # sched: [29:14.50]
+; ATOM-NEXT: popl %es # sched: [29:14.50]
+; ATOM-NEXT: popl %ss # sched: [48:24.00]
+; ATOM-NEXT: popl %fs # sched: [29:14.50]
+; ATOM-NEXT: popl %gs # sched: [29:14.50]
+; ATOM-NEXT: pushl %cs # sched: [2:1.00]
+; ATOM-NEXT: pushl %ds # sched: [2:1.00]
+; ATOM-NEXT: pushl %es # sched: [2:1.00]
+; ATOM-NEXT: pushl %ss # sched: [2:1.00]
+; ATOM-NEXT: pushl %fs # sched: [2:1.00]
+; ATOM-NEXT: pushl %gs # sched: [2:1.00]
+; ATOM-NEXT: #NO_APP
+; ATOM-NEXT: retl # sched: [79:39.50]
+;
+; SLM-LABEL: test_pop_push:
+; SLM: # %bb.0:
+; SLM-NEXT: #APP
+; SLM-NEXT: popl %ds # sched: [100:1.00]
+; SLM-NEXT: popl %es # sched: [100:1.00]
+; SLM-NEXT: popl %ss # sched: [100:1.00]
+; SLM-NEXT: popl %fs # sched: [100:1.00]
+; SLM-NEXT: popl %gs # sched: [100:1.00]
+; SLM-NEXT: pushl %cs # sched: [100:1.00]
+; SLM-NEXT: pushl %ds # sched: [100:1.00]
+; SLM-NEXT: pushl %es # sched: [100:1.00]
+; SLM-NEXT: pushl %ss # sched: [100:1.00]
+; SLM-NEXT: pushl %fs # sched: [100:1.00]
+; SLM-NEXT: pushl %gs # sched: [100:1.00]
+; SLM-NEXT: #NO_APP
+; SLM-NEXT: retl # sched: [4:1.00]
+;
+; SANDY-LABEL: test_pop_push:
+; SANDY: # %bb.0:
+; SANDY-NEXT: #APP
+; SANDY-NEXT: popl %ds # sched: [100:0.33]
+; SANDY-NEXT: popl %es # sched: [100:0.33]
+; SANDY-NEXT: popl %ss # sched: [100:0.33]
+; SANDY-NEXT: popl %fs # sched: [100:0.33]
+; SANDY-NEXT: popl %gs # sched: [100:0.33]
+; SANDY-NEXT: pushl %cs # sched: [100:0.33]
+; SANDY-NEXT: pushl %ds # sched: [100:0.33]
+; SANDY-NEXT: pushl %es # sched: [100:0.33]
+; SANDY-NEXT: pushl %ss # sched: [100:0.33]
+; SANDY-NEXT: pushl %fs # sched: [100:0.33]
+; SANDY-NEXT: pushl %gs # sched: [100:0.33]
+; SANDY-NEXT: #NO_APP
+; SANDY-NEXT: retl # sched: [5:1.00]
+;
+; HASWELL-LABEL: test_pop_push:
+; HASWELL: # %bb.0:
+; HASWELL-NEXT: #APP
+; HASWELL-NEXT: popl %ds # sched: [100:0.25]
+; HASWELL-NEXT: popl %es # sched: [100:0.25]
+; HASWELL-NEXT: popl %ss # sched: [100:0.25]
+; HASWELL-NEXT: popl %fs # sched: [100:0.25]
+; HASWELL-NEXT: popl %gs # sched: [100:0.25]
+; HASWELL-NEXT: pushl %cs # sched: [100:0.25]
+; HASWELL-NEXT: pushl %ds # sched: [100:0.25]
+; HASWELL-NEXT: pushl %es # sched: [100:0.25]
+; HASWELL-NEXT: pushl %ss # sched: [100:0.25]
+; HASWELL-NEXT: pushl %fs # sched: [100:0.25]
+; HASWELL-NEXT: pushl %gs # sched: [100:0.25]
+; HASWELL-NEXT: #NO_APP
+; HASWELL-NEXT: retl # sched: [7:1.00]
+;
+; BROADWELL-LABEL: test_pop_push:
+; BROADWELL: # %bb.0:
+; BROADWELL-NEXT: #APP
+; BROADWELL-NEXT: popl %ds # sched: [100:0.25]
+; BROADWELL-NEXT: popl %es # sched: [100:0.25]
+; BROADWELL-NEXT: popl %ss # sched: [100:0.25]
+; BROADWELL-NEXT: popl %fs # sched: [100:0.25]
+; BROADWELL-NEXT: popl %gs # sched: [100:0.25]
+; BROADWELL-NEXT: pushl %cs # sched: [100:0.25]
+; BROADWELL-NEXT: pushl %ds # sched: [100:0.25]
+; BROADWELL-NEXT: pushl %es # sched: [100:0.25]
+; BROADWELL-NEXT: pushl %ss # sched: [100:0.25]
+; BROADWELL-NEXT: pushl %fs # sched: [100:0.25]
+; BROADWELL-NEXT: pushl %gs # sched: [100:0.25]
+; BROADWELL-NEXT: #NO_APP
+; BROADWELL-NEXT: retl # sched: [6:0.50]
+;
+; SKYLAKE-LABEL: test_pop_push:
+; SKYLAKE: # %bb.0:
+; SKYLAKE-NEXT: #APP
+; SKYLAKE-NEXT: popl %ds # sched: [100:0.25]
+; SKYLAKE-NEXT: popl %es # sched: [100:0.25]
+; SKYLAKE-NEXT: popl %ss # sched: [100:0.25]
+; SKYLAKE-NEXT: popl %fs # sched: [100:0.25]
+; SKYLAKE-NEXT: popl %gs # sched: [100:0.25]
+; SKYLAKE-NEXT: pushl %cs # sched: [100:0.25]
+; SKYLAKE-NEXT: pushl %ds # sched: [100:0.25]
+; SKYLAKE-NEXT: pushl %es # sched: [100:0.25]
+; SKYLAKE-NEXT: pushl %ss # sched: [100:0.25]
+; SKYLAKE-NEXT: pushl %fs # sched: [100:0.25]
+; SKYLAKE-NEXT: pushl %gs # sched: [100:0.25]
+; SKYLAKE-NEXT: #NO_APP
+; SKYLAKE-NEXT: retl # sched: [6:0.50]
+;
+; SKX-LABEL: test_pop_push:
+; SKX: # %bb.0:
+; SKX-NEXT: #APP
+; SKX-NEXT: popl %ds # sched: [100:0.25]
+; SKX-NEXT: popl %es # sched: [100:0.25]
+; SKX-NEXT: popl %ss # sched: [100:0.25]
+; SKX-NEXT: popl %fs # sched: [100:0.25]
+; SKX-NEXT: popl %gs # sched: [100:0.25]
+; SKX-NEXT: pushl %cs # sched: [100:0.25]
+; SKX-NEXT: pushl %ds # sched: [100:0.25]
+; SKX-NEXT: pushl %es # sched: [100:0.25]
+; SKX-NEXT: pushl %ss # sched: [100:0.25]
+; SKX-NEXT: pushl %fs # sched: [100:0.25]
+; SKX-NEXT: pushl %gs # sched: [100:0.25]
+; SKX-NEXT: #NO_APP
+; SKX-NEXT: retl # sched: [6:0.50]
+;
+; BTVER2-LABEL: test_pop_push:
+; BTVER2: # %bb.0:
+; BTVER2-NEXT: #APP
+; BTVER2-NEXT: popl %ds # sched: [100:0.17]
+; BTVER2-NEXT: popl %es # sched: [100:0.17]
+; BTVER2-NEXT: popl %ss # sched: [100:0.17]
+; BTVER2-NEXT: popl %fs # sched: [100:0.17]
+; BTVER2-NEXT: popl %gs # sched: [100:0.17]
+; BTVER2-NEXT: pushl %cs # sched: [100:0.17]
+; BTVER2-NEXT: pushl %ds # sched: [100:0.17]
+; BTVER2-NEXT: pushl %es # sched: [100:0.17]
+; BTVER2-NEXT: pushl %ss # sched: [100:0.17]
+; BTVER2-NEXT: pushl %fs # sched: [100:0.17]
+; BTVER2-NEXT: pushl %gs # sched: [100:0.17]
+; BTVER2-NEXT: #NO_APP
+; BTVER2-NEXT: retl # sched: [4:1.00]
+;
+; ZNVER1-LABEL: test_pop_push:
+; ZNVER1: # %bb.0:
+; ZNVER1-NEXT: #APP
+; ZNVER1-NEXT: popl %ds # sched: [100:?]
+; ZNVER1-NEXT: popl %es # sched: [100:?]
+; ZNVER1-NEXT: popl %ss # sched: [100:?]
+; ZNVER1-NEXT: popl %fs # sched: [100:?]
+; ZNVER1-NEXT: popl %gs # sched: [100:?]
+; ZNVER1-NEXT: pushl %cs # sched: [100:?]
+; ZNVER1-NEXT: pushl %ds # sched: [100:?]
+; ZNVER1-NEXT: pushl %es # sched: [100:?]
+; ZNVER1-NEXT: pushl %ss # sched: [100:?]
+; ZNVER1-NEXT: pushl %fs # sched: [100:?]
+; ZNVER1-NEXT: pushl %gs # sched: [100:?]
+; ZNVER1-NEXT: #NO_APP
+; ZNVER1-NEXT: retl # sched: [1:0.50]
+ call void asm sideeffect "pop %DS \0A\09 pop %ES \0A\09 pop %SS \0A\09 pop %FS \0A\09 pop %GS \0A\09 push %CS \0A\09 push %DS \0A\09 push %ES \0A\09 push %SS \0A\09 push %FS \0A\09 push %GS", ""()
+ ret void
+}
+define i16 @test_pop_push_16(i16 %a0, i16 *%a1) optsize {
+; GENERIC-LABEL: test_pop_push_16:
+; GENERIC: # %bb.0:
+; GENERIC-NEXT: movzwl {{[0-9]+}}(%esp), %eax
+; GENERIC-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; GENERIC-NEXT: #APP
+; GENERIC-NEXT: popw %ax
+; GENERIC-NEXT: popw (%ecx)
+; GENERIC-NEXT: pushw %ax
+; GENERIC-NEXT: pushw (%ecx)
+; GENERIC-NEXT: pushw $4095 # imm = 0xFFF
+; GENERIC-NEXT: pushw $7
+; GENERIC-NEXT: #NO_APP
+; GENERIC-NEXT: retl
+;
+; ATOM-LABEL: test_pop_push_16:
+; ATOM: # %bb.0:
+; ATOM-NEXT: movzwl {{[0-9]+}}(%esp), %eax # sched: [1:1.00]
+; ATOM-NEXT: movl {{[0-9]+}}(%esp), %ecx # sched: [1:1.00]
+; ATOM-NEXT: #APP
+; ATOM-NEXT: popw %ax # sched: [2:1.00]
+; ATOM-NEXT: popw (%ecx) # sched: [3:1.50]
+; ATOM-NEXT: pushw %ax # sched: [1:1.00]
+; ATOM-NEXT: pushw (%ecx) # sched: [2:1.00]
+; ATOM-NEXT: pushw $4095 # imm = 0xFFF
+; ATOM-NEXT: # sched: [1:1.00]
+; ATOM-NEXT: pushw $7 # sched: [1:1.00]
+; ATOM-NEXT: #NO_APP
+; ATOM-NEXT: retl # sched: [79:39.50]
+;
+; SLM-LABEL: test_pop_push_16:
+; SLM: # %bb.0:
+; SLM-NEXT: movzwl {{[0-9]+}}(%esp), %eax # sched: [4:1.00]
+; SLM-NEXT: movl {{[0-9]+}}(%esp), %ecx # sched: [3:1.00]
+; SLM-NEXT: #APP
+; SLM-NEXT: popw %ax # sched: [3:1.00]
+; SLM-NEXT: popw (%ecx) # sched: [1:1.00]
+; SLM-NEXT: pushw %ax # sched: [1:1.00]
+; SLM-NEXT: pushw (%ecx) # sched: [1:1.00]
+; SLM-NEXT: pushw $4095 # imm = 0xFFF
+; SLM-NEXT: # sched: [1:1.00]
+; SLM-NEXT: pushw $7 # sched: [1:1.00]
+; SLM-NEXT: #NO_APP
+; SLM-NEXT: retl # sched: [4:1.00]
+;
+; SANDY-LABEL: test_pop_push_16:
+; SANDY: # %bb.0:
+; SANDY-NEXT: movzwl {{[0-9]+}}(%esp), %eax # sched: [5:0.50]
+; SANDY-NEXT: movl {{[0-9]+}}(%esp), %ecx # sched: [5:0.50]
+; SANDY-NEXT: #APP
+; SANDY-NEXT: popw %ax # sched: [6:0.50]
+; SANDY-NEXT: popw (%ecx) # sched: [6:0.50]
+; SANDY-NEXT: pushw %ax # sched: [5:1.00]
+; SANDY-NEXT: pushw (%ecx) # sched: [5:1.00]
+; SANDY-NEXT: pushw $4095 # imm = 0xFFF
+; SANDY-NEXT: # sched: [1:1.00]
+; SANDY-NEXT: pushw $7 # sched: [1:1.00]
+; SANDY-NEXT: #NO_APP
+; SANDY-NEXT: retl # sched: [5:1.00]
+;
+; HASWELL-LABEL: test_pop_push_16:
+; HASWELL: # %bb.0:
+; HASWELL-NEXT: movzwl {{[0-9]+}}(%esp), %eax # sched: [5:0.50]
+; HASWELL-NEXT: movl {{[0-9]+}}(%esp), %ecx # sched: [5:0.50]
+; HASWELL-NEXT: #APP
+; HASWELL-NEXT: popw %ax # sched: [6:0.50]
+; HASWELL-NEXT: popw (%ecx) # sched: [1:1.00]
+; HASWELL-NEXT: pushw %ax # sched: [2:1.00]
+; HASWELL-NEXT: pushw (%ecx) # sched: [1:1.00]
+; HASWELL-NEXT: pushw $4095 # imm = 0xFFF
+; HASWELL-NEXT: # sched: [1:1.00]
+; HASWELL-NEXT: pushw $7 # sched: [1:1.00]
+; HASWELL-NEXT: #NO_APP
+; HASWELL-NEXT: retl # sched: [7:1.00]
+;
+; BROADWELL-LABEL: test_pop_push_16:
+; BROADWELL: # %bb.0:
+; BROADWELL-NEXT: movzwl {{[0-9]+}}(%esp), %eax # sched: [5:0.50]
+; BROADWELL-NEXT: movl {{[0-9]+}}(%esp), %ecx # sched: [5:0.50]
+; BROADWELL-NEXT: #APP
+; BROADWELL-NEXT: popw %ax # sched: [6:0.50]
+; BROADWELL-NEXT: popw (%ecx) # sched: [6:0.50]
+; BROADWELL-NEXT: pushw %ax # sched: [2:1.00]
+; BROADWELL-NEXT: pushw (%ecx) # sched: [2:1.00]
+; BROADWELL-NEXT: pushw $4095 # imm = 0xFFF
+; BROADWELL-NEXT: # sched: [1:1.00]
+; BROADWELL-NEXT: pushw $7 # sched: [1:1.00]
+; BROADWELL-NEXT: #NO_APP
+; BROADWELL-NEXT: retl # sched: [6:0.50]
+;
+; SKYLAKE-LABEL: test_pop_push_16:
+; SKYLAKE: # %bb.0:
+; SKYLAKE-NEXT: movzwl {{[0-9]+}}(%esp), %eax # sched: [5:0.50]
+; SKYLAKE-NEXT: movl {{[0-9]+}}(%esp), %ecx # sched: [5:0.50]
+; SKYLAKE-NEXT: #APP
+; SKYLAKE-NEXT: popw %ax # sched: [6:0.50]
+; SKYLAKE-NEXT: popw (%ecx) # sched: [6:0.50]
+; SKYLAKE-NEXT: pushw %ax # sched: [2:1.00]
+; SKYLAKE-NEXT: pushw (%ecx) # sched: [2:1.00]
+; SKYLAKE-NEXT: pushw $4095 # imm = 0xFFF
+; SKYLAKE-NEXT: # sched: [1:1.00]
+; SKYLAKE-NEXT: pushw $7 # sched: [1:1.00]
+; SKYLAKE-NEXT: #NO_APP
+; SKYLAKE-NEXT: retl # sched: [6:0.50]
+;
+; SKX-LABEL: test_pop_push_16:
+; SKX: # %bb.0:
+; SKX-NEXT: movzwl {{[0-9]+}}(%esp), %eax # sched: [5:0.50]
+; SKX-NEXT: movl {{[0-9]+}}(%esp), %ecx # sched: [5:0.50]
+; SKX-NEXT: #APP
+; SKX-NEXT: popw %ax # sched: [6:0.50]
+; SKX-NEXT: popw (%ecx) # sched: [6:0.50]
+; SKX-NEXT: pushw %ax # sched: [2:1.00]
+; SKX-NEXT: pushw (%ecx) # sched: [2:1.00]
+; SKX-NEXT: pushw $4095 # imm = 0xFFF
+; SKX-NEXT: # sched: [1:1.00]
+; SKX-NEXT: pushw $7 # sched: [1:1.00]
+; SKX-NEXT: #NO_APP
+; SKX-NEXT: retl # sched: [6:0.50]
+;
+; BTVER2-LABEL: test_pop_push_16:
+; BTVER2: # %bb.0:
+; BTVER2-NEXT: movzwl {{[0-9]+}}(%esp), %eax # sched: [4:1.00]
+; BTVER2-NEXT: movl {{[0-9]+}}(%esp), %ecx # sched: [5:1.00]
+; BTVER2-NEXT: #APP
+; BTVER2-NEXT: popw %ax # sched: [5:1.00]
+; BTVER2-NEXT: popw (%ecx) # sched: [1:1.00]
+; BTVER2-NEXT: pushw %ax # sched: [1:1.00]
+; BTVER2-NEXT: pushw (%ecx) # sched: [1:1.00]
+; BTVER2-NEXT: pushw $4095 # imm = 0xFFF
+; BTVER2-NEXT: # sched: [1:1.00]
+; BTVER2-NEXT: pushw $7 # sched: [1:1.00]
+; BTVER2-NEXT: #NO_APP
+; BTVER2-NEXT: retl # sched: [4:1.00]
+;
+; ZNVER1-LABEL: test_pop_push_16:
+; ZNVER1: # %bb.0:
+; ZNVER1-NEXT: movl {{[0-9]+}}(%esp), %ecx # sched: [8:0.50]
+; ZNVER1-NEXT: movzwl {{[0-9]+}}(%esp), %eax # sched: [8:0.50]
+; ZNVER1-NEXT: #APP
+; ZNVER1-NEXT: popw %ax # sched: [8:0.50]
+; ZNVER1-NEXT: popw (%ecx) # sched: [5:0.50]
+; ZNVER1-NEXT: pushw %ax # sched: [1:0.50]
+; ZNVER1-NEXT: pushw (%ecx) # sched: [4:0.50]
+; ZNVER1-NEXT: pushw $4095 # imm = 0xFFF
+; ZNVER1-NEXT: # sched: [1:0.50]
+; ZNVER1-NEXT: pushw $7 # sched: [1:0.50]
+; ZNVER1-NEXT: #NO_APP
+; ZNVER1-NEXT: retl # sched: [1:0.50]
+ %1 = call i16 asm sideeffect "popw $0 \0A\09 popw $2 \0A\09 pushw $1 \0A\09 pushw $2 \0A\09 pushw $3 \0A\09 pushw $4", "=r,r,*m,i,i"(i16 %a0, i16 *%a1, i16 4095, i8 7)
+ ret i16 %1
+}
+define i32 @test_pop_push_32(i32 %a0, i32 *%a1) optsize {
+; GENERIC-LABEL: test_pop_push_32:
+; GENERIC: # %bb.0:
+; GENERIC-NEXT: movl {{[0-9]+}}(%esp), %eax
+; GENERIC-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; GENERIC-NEXT: #APP
+; GENERIC-NEXT: popl %eax
+; GENERIC-NEXT: popl (%ecx)
+; GENERIC-NEXT: pushl %eax
+; GENERIC-NEXT: pushl (%ecx)
+; GENERIC-NEXT: pushl $4095 # imm = 0xFFF
+; GENERIC-NEXT: pushl $7
+; GENERIC-NEXT: #NO_APP
+; GENERIC-NEXT: retl
+;
+; ATOM-LABEL: test_pop_push_32:
+; ATOM: # %bb.0:
+; ATOM-NEXT: movl {{[0-9]+}}(%esp), %eax # sched: [1:1.00]
+; ATOM-NEXT: movl {{[0-9]+}}(%esp), %ecx # sched: [1:1.00]
+; ATOM-NEXT: #APP
+; ATOM-NEXT: popl %eax # sched: [1:1.00]
+; ATOM-NEXT: popl (%ecx) # sched: [3:1.50]
+; ATOM-NEXT: pushl %eax # sched: [1:1.00]
+; ATOM-NEXT: pushl (%ecx) # sched: [2:1.00]
+; ATOM-NEXT: pushl $4095 # imm = 0xFFF
+; ATOM-NEXT: # sched: [1:1.00]
+; ATOM-NEXT: pushl $7 # sched: [1:1.00]
+; ATOM-NEXT: #NO_APP
+; ATOM-NEXT: retl # sched: [79:39.50]
+;
+; SLM-LABEL: test_pop_push_32:
+; SLM: # %bb.0:
+; SLM-NEXT: movl {{[0-9]+}}(%esp), %eax # sched: [3:1.00]
+; SLM-NEXT: movl {{[0-9]+}}(%esp), %ecx # sched: [3:1.00]
+; SLM-NEXT: #APP
+; SLM-NEXT: popl %eax # sched: [3:1.00]
+; SLM-NEXT: popl (%ecx) # sched: [1:1.00]
+; SLM-NEXT: pushl %eax # sched: [1:1.00]
+; SLM-NEXT: pushl (%ecx) # sched: [1:1.00]
+; SLM-NEXT: pushl $4095 # imm = 0xFFF
+; SLM-NEXT: # sched: [1:1.00]
+; SLM-NEXT: pushl $7 # sched: [1:1.00]
+; SLM-NEXT: #NO_APP
+; SLM-NEXT: retl # sched: [4:1.00]
+;
+; SANDY-LABEL: test_pop_push_32:
+; SANDY: # %bb.0:
+; SANDY-NEXT: movl {{[0-9]+}}(%esp), %eax # sched: [5:0.50]
+; SANDY-NEXT: movl {{[0-9]+}}(%esp), %ecx # sched: [5:0.50]
+; SANDY-NEXT: #APP
+; SANDY-NEXT: popl %eax # sched: [6:0.50]
+; SANDY-NEXT: popl (%ecx) # sched: [6:0.50]
+; SANDY-NEXT: pushl %eax # sched: [5:1.00]
+; SANDY-NEXT: pushl (%ecx) # sched: [5:1.00]
+; SANDY-NEXT: pushl $4095 # imm = 0xFFF
+; SANDY-NEXT: # sched: [1:1.00]
+; SANDY-NEXT: pushl $7 # sched: [1:1.00]
+; SANDY-NEXT: #NO_APP
+; SANDY-NEXT: retl # sched: [5:1.00]
+;
+; HASWELL-LABEL: test_pop_push_32:
+; HASWELL: # %bb.0:
+; HASWELL-NEXT: movl {{[0-9]+}}(%esp), %eax # sched: [5:0.50]
+; HASWELL-NEXT: movl {{[0-9]+}}(%esp), %ecx # sched: [5:0.50]
+; HASWELL-NEXT: #APP
+; HASWELL-NEXT: popl %eax # sched: [6:0.50]
+; HASWELL-NEXT: popl (%ecx) # sched: [1:1.00]
+; HASWELL-NEXT: pushl %eax # sched: [2:1.00]
+; HASWELL-NEXT: pushl (%ecx) # sched: [1:1.00]
+; HASWELL-NEXT: pushl $4095 # imm = 0xFFF
+; HASWELL-NEXT: # sched: [1:1.00]
+; HASWELL-NEXT: pushl $7 # sched: [1:1.00]
+; HASWELL-NEXT: #NO_APP
+; HASWELL-NEXT: retl # sched: [7:1.00]
+;
+; BROADWELL-LABEL: test_pop_push_32:
+; BROADWELL: # %bb.0:
+; BROADWELL-NEXT: movl {{[0-9]+}}(%esp), %eax # sched: [5:0.50]
+; BROADWELL-NEXT: movl {{[0-9]+}}(%esp), %ecx # sched: [5:0.50]
+; BROADWELL-NEXT: #APP
+; BROADWELL-NEXT: popl %eax # sched: [6:0.50]
+; BROADWELL-NEXT: popl (%ecx) # sched: [6:0.50]
+; BROADWELL-NEXT: pushl %eax # sched: [2:1.00]
+; BROADWELL-NEXT: pushl (%ecx) # sched: [2:1.00]
+; BROADWELL-NEXT: pushl $4095 # imm = 0xFFF
+; BROADWELL-NEXT: # sched: [1:1.00]
+; BROADWELL-NEXT: pushl $7 # sched: [1:1.00]
+; BROADWELL-NEXT: #NO_APP
+; BROADWELL-NEXT: retl # sched: [6:0.50]
+;
+; SKYLAKE-LABEL: test_pop_push_32:
+; SKYLAKE: # %bb.0:
+; SKYLAKE-NEXT: movl {{[0-9]+}}(%esp), %eax # sched: [5:0.50]
+; SKYLAKE-NEXT: movl {{[0-9]+}}(%esp), %ecx # sched: [5:0.50]
+; SKYLAKE-NEXT: #APP
+; SKYLAKE-NEXT: popl %eax # sched: [6:0.50]
+; SKYLAKE-NEXT: popl (%ecx) # sched: [6:0.50]
+; SKYLAKE-NEXT: pushl %eax # sched: [2:1.00]
+; SKYLAKE-NEXT: pushl (%ecx) # sched: [2:1.00]
+; SKYLAKE-NEXT: pushl $4095 # imm = 0xFFF
+; SKYLAKE-NEXT: # sched: [1:1.00]
+; SKYLAKE-NEXT: pushl $7 # sched: [1:1.00]
+; SKYLAKE-NEXT: #NO_APP
+; SKYLAKE-NEXT: retl # sched: [6:0.50]
+;
+; SKX-LABEL: test_pop_push_32:
+; SKX: # %bb.0:
+; SKX-NEXT: movl {{[0-9]+}}(%esp), %eax # sched: [5:0.50]
+; SKX-NEXT: movl {{[0-9]+}}(%esp), %ecx # sched: [5:0.50]
+; SKX-NEXT: #APP
+; SKX-NEXT: popl %eax # sched: [6:0.50]
+; SKX-NEXT: popl (%ecx) # sched: [6:0.50]
+; SKX-NEXT: pushl %eax # sched: [2:1.00]
+; SKX-NEXT: pushl (%ecx) # sched: [2:1.00]
+; SKX-NEXT: pushl $4095 # imm = 0xFFF
+; SKX-NEXT: # sched: [1:1.00]
+; SKX-NEXT: pushl $7 # sched: [1:1.00]
+; SKX-NEXT: #NO_APP
+; SKX-NEXT: retl # sched: [6:0.50]
+;
+; BTVER2-LABEL: test_pop_push_32:
+; BTVER2: # %bb.0:
+; BTVER2-NEXT: movl {{[0-9]+}}(%esp), %eax # sched: [5:1.00]
+; BTVER2-NEXT: movl {{[0-9]+}}(%esp), %ecx # sched: [5:1.00]
+; BTVER2-NEXT: #APP
+; BTVER2-NEXT: popl %eax # sched: [5:1.00]
+; BTVER2-NEXT: popl (%ecx) # sched: [1:1.00]
+; BTVER2-NEXT: pushl %eax # sched: [1:1.00]
+; BTVER2-NEXT: pushl (%ecx) # sched: [1:1.00]
+; BTVER2-NEXT: pushl $4095 # imm = 0xFFF
+; BTVER2-NEXT: # sched: [1:1.00]
+; BTVER2-NEXT: pushl $7 # sched: [1:1.00]
+; BTVER2-NEXT: #NO_APP
+; BTVER2-NEXT: retl # sched: [4:1.00]
+;
+; ZNVER1-LABEL: test_pop_push_32:
+; ZNVER1: # %bb.0:
+; ZNVER1-NEXT: movl {{[0-9]+}}(%esp), %eax # sched: [8:0.50]
+; ZNVER1-NEXT: movl {{[0-9]+}}(%esp), %ecx # sched: [8:0.50]
+; ZNVER1-NEXT: #APP
+; ZNVER1-NEXT: popl %eax # sched: [8:0.50]
+; ZNVER1-NEXT: popl (%ecx) # sched: [1:0.50]
+; ZNVER1-NEXT: pushl %eax # sched: [1:0.50]
+; ZNVER1-NEXT: pushl (%ecx) # sched: [4:0.50]
+; ZNVER1-NEXT: pushl $4095 # imm = 0xFFF
+; ZNVER1-NEXT: # sched: [1:0.50]
+; ZNVER1-NEXT: pushl $7 # sched: [1:0.50]
+; ZNVER1-NEXT: #NO_APP
+; ZNVER1-NEXT: retl # sched: [1:0.50]
+ %1 = call i32 asm sideeffect "popl $0 \0A\09 popl $2 \0A\09 pushl $1 \0A\09 pushl $2 \0A\09 pushl $3 \0A\09 pushl $4", "=r,r,*m,i,i"(i32 %a0, i32 *%a1, i32 4095, i8 7)
+ ret i32 %1
+}
+
+define void @test_popa_popf_pusha_pushf() optsize {
+; GENERIC-LABEL: test_popa_popf_pusha_pushf:
+; GENERIC: # %bb.0:
+; GENERIC-NEXT: #APP
+; GENERIC-NEXT: popal
+; GENERIC-NEXT: popfl
+; GENERIC-NEXT: pushal
+; GENERIC-NEXT: pushfl
+; GENERIC-NEXT: #NO_APP
+; GENERIC-NEXT: retl
+;
+; ATOM-LABEL: test_popa_popf_pusha_pushf:
+; ATOM: # %bb.0:
+; ATOM-NEXT: #APP
+; ATOM-NEXT: popal # sched: [9:4.50]
+; ATOM-NEXT: popfl # sched: [26:13.00]
+; ATOM-NEXT: pushal # sched: [8:4.00]
+; ATOM-NEXT: pushfl # sched: [9:4.50]
+; ATOM-NEXT: #NO_APP
+; ATOM-NEXT: retl # sched: [79:39.50]
+;
+; SLM-LABEL: test_popa_popf_pusha_pushf:
+; SLM: # %bb.0:
+; SLM-NEXT: #APP
+; SLM-NEXT: popal # sched: [3:1.00]
+; SLM-NEXT: popfl # sched: [3:1.00]
+; SLM-NEXT: pushal # sched: [1:1.00]
+; SLM-NEXT: pushfl # sched: [1:1.00]
+; SLM-NEXT: #NO_APP
+; SLM-NEXT: retl # sched: [4:1.00]
+;
+; SANDY-LABEL: test_popa_popf_pusha_pushf:
+; SANDY: # %bb.0:
+; SANDY-NEXT: #APP
+; SANDY-NEXT: popal # sched: [4:0.50]
+; SANDY-NEXT: popfl # sched: [4:0.50]
+; SANDY-NEXT: pushal # sched: [1:1.00]
+; SANDY-NEXT: pushfl # sched: [1:1.00]
+; SANDY-NEXT: #NO_APP
+; SANDY-NEXT: retl # sched: [5:1.00]
+;
+; HASWELL-LABEL: test_popa_popf_pusha_pushf:
+; HASWELL: # %bb.0:
+; HASWELL-NEXT: #APP
+; HASWELL-NEXT: popal # sched: [1:?]
+; HASWELL-NEXT: popfl # sched: [5:0.50]
+; HASWELL-NEXT: pushal # sched: [1:?]
+; HASWELL-NEXT: pushfl # sched: [1:1.00]
+; HASWELL-NEXT: #NO_APP
+; HASWELL-NEXT: retl # sched: [7:1.00]
+;
+; BROADWELL-LABEL: test_popa_popf_pusha_pushf:
+; BROADWELL: # %bb.0:
+; BROADWELL-NEXT: #APP
+; BROADWELL-NEXT: popal # sched: [5:0.50]
+; BROADWELL-NEXT: popfl # sched: [5:0.50]
+; BROADWELL-NEXT: pushal # sched: [1:1.00]
+; BROADWELL-NEXT: pushfl # sched: [1:1.00]
+; BROADWELL-NEXT: #NO_APP
+; BROADWELL-NEXT: retl # sched: [6:0.50]
+;
+; SKYLAKE-LABEL: test_popa_popf_pusha_pushf:
+; SKYLAKE: # %bb.0:
+; SKYLAKE-NEXT: #APP
+; SKYLAKE-NEXT: popal # sched: [5:0.50]
+; SKYLAKE-NEXT: popfl # sched: [5:0.50]
+; SKYLAKE-NEXT: pushal # sched: [1:1.00]
+; SKYLAKE-NEXT: pushfl # sched: [1:1.00]
+; SKYLAKE-NEXT: #NO_APP
+; SKYLAKE-NEXT: retl # sched: [6:0.50]
+;
+; SKX-LABEL: test_popa_popf_pusha_pushf:
+; SKX: # %bb.0:
+; SKX-NEXT: #APP
+; SKX-NEXT: popal # sched: [5:0.50]
+; SKX-NEXT: popfl # sched: [5:0.50]
+; SKX-NEXT: pushal # sched: [1:1.00]
+; SKX-NEXT: pushfl # sched: [1:1.00]
+; SKX-NEXT: #NO_APP
+; SKX-NEXT: retl # sched: [6:0.50]
+;
+; BTVER2-LABEL: test_popa_popf_pusha_pushf:
+; BTVER2: # %bb.0:
+; BTVER2-NEXT: #APP
+; BTVER2-NEXT: popal # sched: [5:1.00]
+; BTVER2-NEXT: popfl # sched: [5:1.00]
+; BTVER2-NEXT: pushal # sched: [1:1.00]
+; BTVER2-NEXT: pushfl # sched: [1:1.00]
+; BTVER2-NEXT: #NO_APP
+; BTVER2-NEXT: retl # sched: [4:1.00]
+;
+; ZNVER1-LABEL: test_popa_popf_pusha_pushf:
+; ZNVER1: # %bb.0:
+; ZNVER1-NEXT: #APP
+; ZNVER1-NEXT: popal # sched: [100:?]
+; ZNVER1-NEXT: popfl # sched: [100:?]
+; ZNVER1-NEXT: pushal # sched: [8:0.50]
+; ZNVER1-NEXT: pushfl # sched: [100:?]
+; ZNVER1-NEXT: #NO_APP
+; ZNVER1-NEXT: retl # sched: [1:0.50]
+ call void asm sideeffect "popa \0A\09 popf \0A\09 pusha \0A\09 pushf", ""()
+ ret void
+}
+
define i8 @test_salc() optsize {
; GENERIC-LABEL: test_salc:
; GENERIC: # %bb.0:
Modified: llvm/trunk/test/CodeGen/X86/schedule-x86_64.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/schedule-x86_64.ll?rev=320598&r1=320597&r2=320598&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/schedule-x86_64.ll (original)
+++ llvm/trunk/test/CodeGen/X86/schedule-x86_64.ll Wed Dec 13 09:42:25 2017
@@ -9161,18 +9161,459 @@ define void @test_pause() optsize {
ret void
}
-; TODO - test_pop
-; TODO - test_popa
-; TODO - test_popf
-; TODO - test_popfd
-; TODO - test_popfq
+define void @test_pop_push() optsize {
+; GENERIC-LABEL: test_pop_push:
+; GENERIC: # %bb.0:
+; GENERIC-NEXT: #APP
+; GENERIC-NEXT: popq %fs # sched: [100:0.33]
+; GENERIC-NEXT: popq %gs # sched: [100:0.33]
+; GENERIC-NEXT: pushq %fs # sched: [3:1.00]
+; GENERIC-NEXT: pushq %gs # sched: [5:1.00]
+; GENERIC-NEXT: #NO_APP
+; GENERIC-NEXT: retq # sched: [1:1.00]
+;
+; ATOM-LABEL: test_pop_push:
+; ATOM: # %bb.0:
+; ATOM-NEXT: #APP
+; ATOM-NEXT: popq %fs # sched: [29:14.50]
+; ATOM-NEXT: popq %gs # sched: [29:14.50]
+; ATOM-NEXT: pushq %fs # sched: [2:1.00]
+; ATOM-NEXT: pushq %gs # sched: [2:1.00]
+; ATOM-NEXT: #NO_APP
+; ATOM-NEXT: retq # sched: [79:39.50]
+;
+; SLM-LABEL: test_pop_push:
+; SLM: # %bb.0:
+; SLM-NEXT: #APP
+; SLM-NEXT: popq %fs # sched: [100:1.00]
+; SLM-NEXT: popq %gs # sched: [100:1.00]
+; SLM-NEXT: pushq %fs # sched: [100:1.00]
+; SLM-NEXT: pushq %gs # sched: [100:1.00]
+; SLM-NEXT: #NO_APP
+; SLM-NEXT: retq # sched: [4:1.00]
+;
+; SANDY-LABEL: test_pop_push:
+; SANDY: # %bb.0:
+; SANDY-NEXT: #APP
+; SANDY-NEXT: popq %fs # sched: [100:0.33]
+; SANDY-NEXT: popq %gs # sched: [100:0.33]
+; SANDY-NEXT: pushq %fs # sched: [3:1.00]
+; SANDY-NEXT: pushq %gs # sched: [5:1.00]
+; SANDY-NEXT: #NO_APP
+; SANDY-NEXT: retq # sched: [1:1.00]
+;
+; HASWELL-LABEL: test_pop_push:
+; HASWELL: # %bb.0:
+; HASWELL-NEXT: #APP
+; HASWELL-NEXT: popq %fs # sched: [100:0.25]
+; HASWELL-NEXT: popq %gs # sched: [100:0.25]
+; HASWELL-NEXT: pushq %fs # sched: [100:0.25]
+; HASWELL-NEXT: pushq %gs # sched: [100:0.25]
+; HASWELL-NEXT: #NO_APP
+; HASWELL-NEXT: retq # sched: [7:1.00]
+;
+; BROADWELL-LABEL: test_pop_push:
+; BROADWELL: # %bb.0:
+; BROADWELL-NEXT: #APP
+; BROADWELL-NEXT: popq %fs # sched: [100:0.25]
+; BROADWELL-NEXT: popq %gs # sched: [100:0.25]
+; BROADWELL-NEXT: pushq %fs # sched: [100:0.25]
+; BROADWELL-NEXT: pushq %gs # sched: [100:0.25]
+; BROADWELL-NEXT: #NO_APP
+; BROADWELL-NEXT: retq # sched: [7:1.00]
+;
+; SKYLAKE-LABEL: test_pop_push:
+; SKYLAKE: # %bb.0:
+; SKYLAKE-NEXT: #APP
+; SKYLAKE-NEXT: popq %fs # sched: [100:0.25]
+; SKYLAKE-NEXT: popq %gs # sched: [100:0.25]
+; SKYLAKE-NEXT: pushq %fs # sched: [100:0.25]
+; SKYLAKE-NEXT: pushq %gs # sched: [100:0.25]
+; SKYLAKE-NEXT: #NO_APP
+; SKYLAKE-NEXT: retq # sched: [7:1.00]
+;
+; SKX-LABEL: test_pop_push:
+; SKX: # %bb.0:
+; SKX-NEXT: #APP
+; SKX-NEXT: popq %fs # sched: [100:0.25]
+; SKX-NEXT: popq %gs # sched: [100:0.25]
+; SKX-NEXT: pushq %fs # sched: [100:0.25]
+; SKX-NEXT: pushq %gs # sched: [100:0.25]
+; SKX-NEXT: #NO_APP
+; SKX-NEXT: retq # sched: [7:1.00]
+;
+; BTVER2-LABEL: test_pop_push:
+; BTVER2: # %bb.0:
+; BTVER2-NEXT: #APP
+; BTVER2-NEXT: popq %fs # sched: [100:0.17]
+; BTVER2-NEXT: popq %gs # sched: [100:0.17]
+; BTVER2-NEXT: pushq %fs # sched: [100:0.17]
+; BTVER2-NEXT: pushq %gs # sched: [100:0.17]
+; BTVER2-NEXT: #NO_APP
+; BTVER2-NEXT: retq # sched: [4:1.00]
+;
+; ZNVER1-LABEL: test_pop_push:
+; ZNVER1: # %bb.0:
+; ZNVER1-NEXT: #APP
+; ZNVER1-NEXT: popq %fs # sched: [100:?]
+; ZNVER1-NEXT: popq %gs # sched: [100:?]
+; ZNVER1-NEXT: pushq %fs # sched: [100:?]
+; ZNVER1-NEXT: pushq %gs # sched: [100:?]
+; ZNVER1-NEXT: #NO_APP
+; ZNVER1-NEXT: retq # sched: [1:0.50]
+ call void asm sideeffect "pop %FS \0A\09 pop %GS \0A\09 push %FS \0A\09 push %GS", ""()
+ ret void
+}
+define i16 @test_pop_push_16(i16 %a0, i16 *%a1) optsize {
+; GENERIC-LABEL: test_pop_push_16:
+; GENERIC: # %bb.0:
+; GENERIC-NEXT: #APP
+; GENERIC-NEXT: popw %ax # sched: [6:0.50]
+; GENERIC-NEXT: popw (%rsi) # sched: [6:0.50]
+; GENERIC-NEXT: pushw %di # sched: [5:1.00]
+; GENERIC-NEXT: pushw (%rsi) # sched: [5:1.00]
+; GENERIC-NEXT: pushw $4095 # imm = 0xFFF
+; GENERIC-NEXT: # sched: [1:1.00]
+; GENERIC-NEXT: pushw $7 # sched: [1:1.00]
+; GENERIC-NEXT: #NO_APP
+; GENERIC-NEXT: retq # sched: [1:1.00]
+;
+; ATOM-LABEL: test_pop_push_16:
+; ATOM: # %bb.0:
+; ATOM-NEXT: #APP
+; ATOM-NEXT: popw %ax # sched: [2:1.00]
+; ATOM-NEXT: popw (%rsi) # sched: [3:1.50]
+; ATOM-NEXT: pushw %di # sched: [1:1.00]
+; ATOM-NEXT: pushw (%rsi) # sched: [2:1.00]
+; ATOM-NEXT: pushw $4095 # imm = 0xFFF
+; ATOM-NEXT: # sched: [1:1.00]
+; ATOM-NEXT: pushw $7 # sched: [1:1.00]
+; ATOM-NEXT: #NO_APP
+; ATOM-NEXT: retq # sched: [79:39.50]
+;
+; SLM-LABEL: test_pop_push_16:
+; SLM: # %bb.0:
+; SLM-NEXT: #APP
+; SLM-NEXT: popw %ax # sched: [3:1.00]
+; SLM-NEXT: popw (%rsi) # sched: [1:1.00]
+; SLM-NEXT: pushw %di # sched: [1:1.00]
+; SLM-NEXT: pushw (%rsi) # sched: [1:1.00]
+; SLM-NEXT: pushw $4095 # imm = 0xFFF
+; SLM-NEXT: # sched: [1:1.00]
+; SLM-NEXT: pushw $7 # sched: [1:1.00]
+; SLM-NEXT: #NO_APP
+; SLM-NEXT: retq # sched: [4:1.00]
+;
+; SANDY-LABEL: test_pop_push_16:
+; SANDY: # %bb.0:
+; SANDY-NEXT: #APP
+; SANDY-NEXT: popw %ax # sched: [6:0.50]
+; SANDY-NEXT: popw (%rsi) # sched: [6:0.50]
+; SANDY-NEXT: pushw %di # sched: [5:1.00]
+; SANDY-NEXT: pushw (%rsi) # sched: [5:1.00]
+; SANDY-NEXT: pushw $4095 # imm = 0xFFF
+; SANDY-NEXT: # sched: [1:1.00]
+; SANDY-NEXT: pushw $7 # sched: [1:1.00]
+; SANDY-NEXT: #NO_APP
+; SANDY-NEXT: retq # sched: [1:1.00]
+;
+; HASWELL-LABEL: test_pop_push_16:
+; HASWELL: # %bb.0:
+; HASWELL-NEXT: #APP
+; HASWELL-NEXT: popw %ax # sched: [6:0.50]
+; HASWELL-NEXT: popw (%rsi) # sched: [1:1.00]
+; HASWELL-NEXT: pushw %di # sched: [2:1.00]
+; HASWELL-NEXT: pushw (%rsi) # sched: [1:1.00]
+; HASWELL-NEXT: pushw $4095 # imm = 0xFFF
+; HASWELL-NEXT: # sched: [1:1.00]
+; HASWELL-NEXT: pushw $7 # sched: [1:1.00]
+; HASWELL-NEXT: #NO_APP
+; HASWELL-NEXT: retq # sched: [7:1.00]
+;
+; BROADWELL-LABEL: test_pop_push_16:
+; BROADWELL: # %bb.0:
+; BROADWELL-NEXT: #APP
+; BROADWELL-NEXT: popw %ax # sched: [6:0.50]
+; BROADWELL-NEXT: popw (%rsi) # sched: [6:0.50]
+; BROADWELL-NEXT: pushw %di # sched: [2:1.00]
+; BROADWELL-NEXT: pushw (%rsi) # sched: [2:1.00]
+; BROADWELL-NEXT: pushw $4095 # imm = 0xFFF
+; BROADWELL-NEXT: # sched: [1:1.00]
+; BROADWELL-NEXT: pushw $7 # sched: [1:1.00]
+; BROADWELL-NEXT: #NO_APP
+; BROADWELL-NEXT: retq # sched: [7:1.00]
+;
+; SKYLAKE-LABEL: test_pop_push_16:
+; SKYLAKE: # %bb.0:
+; SKYLAKE-NEXT: #APP
+; SKYLAKE-NEXT: popw %ax # sched: [6:0.50]
+; SKYLAKE-NEXT: popw (%rsi) # sched: [6:0.50]
+; SKYLAKE-NEXT: pushw %di # sched: [2:1.00]
+; SKYLAKE-NEXT: pushw (%rsi) # sched: [2:1.00]
+; SKYLAKE-NEXT: pushw $4095 # imm = 0xFFF
+; SKYLAKE-NEXT: # sched: [1:1.00]
+; SKYLAKE-NEXT: pushw $7 # sched: [1:1.00]
+; SKYLAKE-NEXT: #NO_APP
+; SKYLAKE-NEXT: retq # sched: [7:1.00]
+;
+; SKX-LABEL: test_pop_push_16:
+; SKX: # %bb.0:
+; SKX-NEXT: #APP
+; SKX-NEXT: popw %ax # sched: [6:0.50]
+; SKX-NEXT: popw (%rsi) # sched: [6:0.50]
+; SKX-NEXT: pushw %di # sched: [2:1.00]
+; SKX-NEXT: pushw (%rsi) # sched: [2:1.00]
+; SKX-NEXT: pushw $4095 # imm = 0xFFF
+; SKX-NEXT: # sched: [1:1.00]
+; SKX-NEXT: pushw $7 # sched: [1:1.00]
+; SKX-NEXT: #NO_APP
+; SKX-NEXT: retq # sched: [7:1.00]
+;
+; BTVER2-LABEL: test_pop_push_16:
+; BTVER2: # %bb.0:
+; BTVER2-NEXT: #APP
+; BTVER2-NEXT: popw %ax # sched: [5:1.00]
+; BTVER2-NEXT: popw (%rsi) # sched: [1:1.00]
+; BTVER2-NEXT: pushw %di # sched: [1:1.00]
+; BTVER2-NEXT: pushw (%rsi) # sched: [1:1.00]
+; BTVER2-NEXT: pushw $4095 # imm = 0xFFF
+; BTVER2-NEXT: # sched: [1:1.00]
+; BTVER2-NEXT: pushw $7 # sched: [1:1.00]
+; BTVER2-NEXT: #NO_APP
+; BTVER2-NEXT: retq # sched: [4:1.00]
+;
+; ZNVER1-LABEL: test_pop_push_16:
+; ZNVER1: # %bb.0:
+; ZNVER1-NEXT: #APP
+; ZNVER1-NEXT: popw %ax # sched: [8:0.50]
+; ZNVER1-NEXT: popw (%rsi) # sched: [5:0.50]
+; ZNVER1-NEXT: pushw %di # sched: [1:0.50]
+; ZNVER1-NEXT: pushw (%rsi) # sched: [4:0.50]
+; ZNVER1-NEXT: pushw $4095 # imm = 0xFFF
+; ZNVER1-NEXT: # sched: [1:0.50]
+; ZNVER1-NEXT: pushw $7 # sched: [1:0.50]
+; ZNVER1-NEXT: #NO_APP
+; ZNVER1-NEXT: retq # sched: [1:0.50]
+ %1 = call i16 asm sideeffect "popw $0 \0A\09 popw $2 \0A\09 pushw $1 \0A\09 pushw $2 \0A\09 pushw $3 \0A\09 pushw $4", "=r,r,*m,i,i"(i16 %a0, i16 *%a1, i16 4095, i8 7)
+ ret i16 %1
+}
+define i64 @test_pop_push_64(i64 %a0, i64 *%a1) optsize {
+; GENERIC-LABEL: test_pop_push_64:
+; GENERIC: # %bb.0:
+; GENERIC-NEXT: #APP
+; GENERIC-NEXT: popq %rax # sched: [6:0.50]
+; GENERIC-NEXT: popq (%rsi) # sched: [6:0.50]
+; GENERIC-NEXT: pushq %rdi # sched: [5:1.00]
+; GENERIC-NEXT: pushq (%rsi) # sched: [5:1.00]
+; GENERIC-NEXT: pushq $4095 # imm = 0xFFF
+; GENERIC-NEXT: # sched: [1:1.00]
+; GENERIC-NEXT: pushq $7 # sched: [5:1.00]
+; GENERIC-NEXT: #NO_APP
+; GENERIC-NEXT: retq # sched: [1:1.00]
+;
+; ATOM-LABEL: test_pop_push_64:
+; ATOM: # %bb.0:
+; ATOM-NEXT: #APP
+; ATOM-NEXT: popq %rax # sched: [1:1.00]
+; ATOM-NEXT: popq (%rsi) # sched: [3:1.50]
+; ATOM-NEXT: pushq %rdi # sched: [1:1.00]
+; ATOM-NEXT: pushq (%rsi) # sched: [2:1.00]
+; ATOM-NEXT: pushq $4095 # imm = 0xFFF
+; ATOM-NEXT: # sched: [1:1.00]
+; ATOM-NEXT: pushq $7 # sched: [1:1.00]
+; ATOM-NEXT: #NO_APP
+; ATOM-NEXT: retq # sched: [79:39.50]
+;
+; SLM-LABEL: test_pop_push_64:
+; SLM: # %bb.0:
+; SLM-NEXT: #APP
+; SLM-NEXT: popq %rax # sched: [3:1.00]
+; SLM-NEXT: popq (%rsi) # sched: [1:1.00]
+; SLM-NEXT: pushq %rdi # sched: [1:1.00]
+; SLM-NEXT: pushq (%rsi) # sched: [1:1.00]
+; SLM-NEXT: pushq $4095 # imm = 0xFFF
+; SLM-NEXT: # sched: [1:1.00]
+; SLM-NEXT: pushq $7 # sched: [1:1.00]
+; SLM-NEXT: #NO_APP
+; SLM-NEXT: retq # sched: [4:1.00]
+;
+; SANDY-LABEL: test_pop_push_64:
+; SANDY: # %bb.0:
+; SANDY-NEXT: #APP
+; SANDY-NEXT: popq %rax # sched: [6:0.50]
+; SANDY-NEXT: popq (%rsi) # sched: [6:0.50]
+; SANDY-NEXT: pushq %rdi # sched: [5:1.00]
+; SANDY-NEXT: pushq (%rsi) # sched: [5:1.00]
+; SANDY-NEXT: pushq $4095 # imm = 0xFFF
+; SANDY-NEXT: # sched: [1:1.00]
+; SANDY-NEXT: pushq $7 # sched: [5:1.00]
+; SANDY-NEXT: #NO_APP
+; SANDY-NEXT: retq # sched: [1:1.00]
+;
+; HASWELL-LABEL: test_pop_push_64:
+; HASWELL: # %bb.0:
+; HASWELL-NEXT: #APP
+; HASWELL-NEXT: popq %rax # sched: [6:0.50]
+; HASWELL-NEXT: popq (%rsi) # sched: [6:0.50]
+; HASWELL-NEXT: pushq %rdi # sched: [2:1.00]
+; HASWELL-NEXT: pushq (%rsi) # sched: [2:1.00]
+; HASWELL-NEXT: pushq $4095 # imm = 0xFFF
+; HASWELL-NEXT: # sched: [1:1.00]
+; HASWELL-NEXT: pushq $7 # sched: [2:1.00]
+; HASWELL-NEXT: #NO_APP
+; HASWELL-NEXT: retq # sched: [7:1.00]
+;
+; BROADWELL-LABEL: test_pop_push_64:
+; BROADWELL: # %bb.0:
+; BROADWELL-NEXT: #APP
+; BROADWELL-NEXT: popq %rax # sched: [6:0.50]
+; BROADWELL-NEXT: popq (%rsi) # sched: [6:0.50]
+; BROADWELL-NEXT: pushq %rdi # sched: [2:1.00]
+; BROADWELL-NEXT: pushq (%rsi) # sched: [2:1.00]
+; BROADWELL-NEXT: pushq $4095 # imm = 0xFFF
+; BROADWELL-NEXT: # sched: [1:1.00]
+; BROADWELL-NEXT: pushq $7 # sched: [2:1.00]
+; BROADWELL-NEXT: #NO_APP
+; BROADWELL-NEXT: retq # sched: [7:1.00]
+;
+; SKYLAKE-LABEL: test_pop_push_64:
+; SKYLAKE: # %bb.0:
+; SKYLAKE-NEXT: #APP
+; SKYLAKE-NEXT: popq %rax # sched: [6:0.50]
+; SKYLAKE-NEXT: popq (%rsi) # sched: [6:0.50]
+; SKYLAKE-NEXT: pushq %rdi # sched: [2:1.00]
+; SKYLAKE-NEXT: pushq (%rsi) # sched: [2:1.00]
+; SKYLAKE-NEXT: pushq $4095 # imm = 0xFFF
+; SKYLAKE-NEXT: # sched: [1:1.00]
+; SKYLAKE-NEXT: pushq $7 # sched: [2:1.00]
+; SKYLAKE-NEXT: #NO_APP
+; SKYLAKE-NEXT: retq # sched: [7:1.00]
+;
+; SKX-LABEL: test_pop_push_64:
+; SKX: # %bb.0:
+; SKX-NEXT: #APP
+; SKX-NEXT: popq %rax # sched: [6:0.50]
+; SKX-NEXT: popq (%rsi) # sched: [6:0.50]
+; SKX-NEXT: pushq %rdi # sched: [2:1.00]
+; SKX-NEXT: pushq (%rsi) # sched: [2:1.00]
+; SKX-NEXT: pushq $4095 # imm = 0xFFF
+; SKX-NEXT: # sched: [1:1.00]
+; SKX-NEXT: pushq $7 # sched: [2:1.00]
+; SKX-NEXT: #NO_APP
+; SKX-NEXT: retq # sched: [7:1.00]
+;
+; BTVER2-LABEL: test_pop_push_64:
+; BTVER2: # %bb.0:
+; BTVER2-NEXT: #APP
+; BTVER2-NEXT: popq %rax # sched: [5:1.00]
+; BTVER2-NEXT: popq (%rsi) # sched: [1:1.00]
+; BTVER2-NEXT: pushq %rdi # sched: [1:1.00]
+; BTVER2-NEXT: pushq (%rsi) # sched: [1:1.00]
+; BTVER2-NEXT: pushq $4095 # imm = 0xFFF
+; BTVER2-NEXT: # sched: [1:1.00]
+; BTVER2-NEXT: pushq $7 # sched: [1:1.00]
+; BTVER2-NEXT: #NO_APP
+; BTVER2-NEXT: retq # sched: [4:1.00]
+;
+; ZNVER1-LABEL: test_pop_push_64:
+; ZNVER1: # %bb.0:
+; ZNVER1-NEXT: #APP
+; ZNVER1-NEXT: popq %rax # sched: [8:0.50]
+; ZNVER1-NEXT: popq (%rsi) # sched: [1:0.50]
+; ZNVER1-NEXT: pushq %rdi # sched: [1:0.50]
+; ZNVER1-NEXT: pushq (%rsi) # sched: [1:0.50]
+; ZNVER1-NEXT: pushq $4095 # imm = 0xFFF
+; ZNVER1-NEXT: # sched: [1:0.50]
+; ZNVER1-NEXT: pushq $7 # sched: [1:0.50]
+; ZNVER1-NEXT: #NO_APP
+; ZNVER1-NEXT: retq # sched: [1:0.50]
+ %1 = call i64 asm sideeffect "popq $0 \0A\09 popq $2 \0A\09 pushq $1 \0A\09 pushq $2 \0A\09 pushq $3 \0A\09 pushq $4", "=r,r,*m,i,i"(i64 %a0, i64 *%a1, i64 4095, i8 7)
+ ret i64 %1
+}
-; TODO - test_push
-; TODO - test_pusha
-; TODO - test_pushad
-; TODO - test_pushf
-; TODO - test_pushfd
-; TODO - test_pushfq
+define void @test_popf_pushf() optsize {
+; GENERIC-LABEL: test_popf_pushf:
+; GENERIC: # %bb.0:
+; GENERIC-NEXT: #APP
+; GENERIC-NEXT: popfq # sched: [4:0.50]
+; GENERIC-NEXT: pushfq # sched: [5:1.00]
+; GENERIC-NEXT: #NO_APP
+; GENERIC-NEXT: retq # sched: [1:1.00]
+;
+; ATOM-LABEL: test_popf_pushf:
+; ATOM: # %bb.0:
+; ATOM-NEXT: #APP
+; ATOM-NEXT: popfq # sched: [26:13.00]
+; ATOM-NEXT: pushfq # sched: [9:4.50]
+; ATOM-NEXT: #NO_APP
+; ATOM-NEXT: retq # sched: [79:39.50]
+;
+; SLM-LABEL: test_popf_pushf:
+; SLM: # %bb.0:
+; SLM-NEXT: #APP
+; SLM-NEXT: popfq # sched: [3:1.00]
+; SLM-NEXT: pushfq # sched: [1:1.00]
+; SLM-NEXT: #NO_APP
+; SLM-NEXT: retq # sched: [4:1.00]
+;
+; SANDY-LABEL: test_popf_pushf:
+; SANDY: # %bb.0:
+; SANDY-NEXT: #APP
+; SANDY-NEXT: popfq # sched: [4:0.50]
+; SANDY-NEXT: pushfq # sched: [5:1.00]
+; SANDY-NEXT: #NO_APP
+; SANDY-NEXT: retq # sched: [1:1.00]
+;
+; HASWELL-LABEL: test_popf_pushf:
+; HASWELL: # %bb.0:
+; HASWELL-NEXT: #APP
+; HASWELL-NEXT: popfq # sched: [5:0.50]
+; HASWELL-NEXT: pushfq # sched: [5:1.00]
+; HASWELL-NEXT: #NO_APP
+; HASWELL-NEXT: retq # sched: [7:1.00]
+;
+; BROADWELL-LABEL: test_popf_pushf:
+; BROADWELL: # %bb.0:
+; BROADWELL-NEXT: #APP
+; BROADWELL-NEXT: popfq # sched: [22:4.25]
+; BROADWELL-NEXT: pushfq # sched: [5:1.00]
+; BROADWELL-NEXT: #NO_APP
+; BROADWELL-NEXT: retq # sched: [7:1.00]
+;
+; SKYLAKE-LABEL: test_popf_pushf:
+; SKYLAKE: # %bb.0:
+; SKYLAKE-NEXT: #APP
+; SKYLAKE-NEXT: popfq # sched: [5:0.50]
+; SKYLAKE-NEXT: pushfq # sched: [5:1.00]
+; SKYLAKE-NEXT: #NO_APP
+; SKYLAKE-NEXT: retq # sched: [7:1.00]
+;
+; SKX-LABEL: test_popf_pushf:
+; SKX: # %bb.0:
+; SKX-NEXT: #APP
+; SKX-NEXT: popfq # sched: [5:0.50]
+; SKX-NEXT: pushfq # sched: [5:1.00]
+; SKX-NEXT: #NO_APP
+; SKX-NEXT: retq # sched: [7:1.00]
+;
+; BTVER2-LABEL: test_popf_pushf:
+; BTVER2: # %bb.0:
+; BTVER2-NEXT: #APP
+; BTVER2-NEXT: popfq # sched: [5:1.00]
+; BTVER2-NEXT: pushfq # sched: [1:1.00]
+; BTVER2-NEXT: #NO_APP
+; BTVER2-NEXT: retq # sched: [4:1.00]
+;
+; ZNVER1-LABEL: test_popf_pushf:
+; ZNVER1: # %bb.0:
+; ZNVER1-NEXT: #APP
+; ZNVER1-NEXT: popfq # sched: [8:0.50]
+; ZNVER1-NEXT: pushfq # sched: [1:0.50]
+; ZNVER1-NEXT: #NO_APP
+; ZNVER1-NEXT: retq # sched: [1:0.50]
+ call void asm sideeffect "popf \0A\09 pushf", ""()
+ ret void
+}
define void @test_rcl_rcr_8(i8 %a0, i8 %a1, i8 *%a2) optsize {
; GENERIC-LABEL: test_rcl_rcr_8:
More information about the llvm-commits
mailing list