Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
LLVM bpEVL
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lorenzo Albano
LLVM bpEVL
Commits
1df18ee3
Commit
1df18ee3
authored
7 years ago
by
Simon Pilgrim
Browse files
Options
Downloads
Patches
Plain Diff
[X86] Add XCHG schedule tests
llvm-svn: 320586
parent
9d9f1701
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
llvm/test/CodeGen/X86/schedule-x86_32.ll
+124
-0
124 additions, 0 deletions
llvm/test/CodeGen/X86/schedule-x86_32.ll
llvm/test/CodeGen/X86/schedule-x86_64.ll
+362
-1
362 additions, 1 deletion
llvm/test/CodeGen/X86/schedule-x86_64.ll
with
486 additions
and
1 deletion
llvm/test/CodeGen/X86/schedule-x86_32.ll
+
124
−
0
View file @
1df18ee3
...
@@ -1408,3 +1408,127 @@ define i8 @test_salc() optsize {
...
@@ -1408,3 +1408,127 @@ define i8 @test_salc() optsize {
%1
=
tail
call
i8
asm
"salc"
,
"=r"
()
nounwind
%1
=
tail
call
i8
asm
"salc"
,
"=r"
()
nounwind
ret
i8
%1
ret
i8
%1
}
}
define
void
@test_xchg_32
(
i32
%a0
,
i32
%a1
,
i32
*
%a2
)
optsize
{
; GENERIC-LABEL: test_xchg_32:
; GENERIC: # %bb.0:
; GENERIC-NEXT: movl {{[0-9]+}}(%esp), %eax
; GENERIC-NEXT: movl {{[0-9]+}}(%esp), %ecx
; GENERIC-NEXT: movl {{[0-9]+}}(%esp), %edx
; GENERIC-NEXT: #APP
; GENERIC-NEXT: xchgl %eax, %eax
; GENERIC-NEXT: xchgl %ecx, %eax
; GENERIC-NEXT: xchgl %eax, (%edx)
; GENERIC-NEXT: #NO_APP
; GENERIC-NEXT: retl
;
; ATOM-LABEL: test_xchg_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: movl {{[0-9]+}}(%esp), %edx # sched: [1:1.00]
; ATOM-NEXT: #APP
; ATOM-NEXT: xchgl %eax, %eax # sched: [2:1.00]
; ATOM-NEXT: xchgl %ecx, %eax # sched: [2:1.00]
; ATOM-NEXT: xchgl %eax, (%edx) # sched: [3:1.50]
; ATOM-NEXT: #NO_APP
; ATOM-NEXT: retl # sched: [79:39.50]
;
; SLM-LABEL: test_xchg_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: movl {{[0-9]+}}(%esp), %edx # sched: [3:1.00]
; SLM-NEXT: #APP
; SLM-NEXT: xchgl %eax, %eax # sched: [1:0.50]
; SLM-NEXT: xchgl %ecx, %eax # sched: [1:0.50]
; SLM-NEXT: xchgl %eax, (%edx) # sched: [4:2.00]
; SLM-NEXT: #NO_APP
; SLM-NEXT: retl # sched: [4:1.00]
;
; SANDY-LABEL: test_xchg_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: movl {{[0-9]+}}(%esp), %edx # sched: [5:0.50]
; SANDY-NEXT: #APP
; SANDY-NEXT: xchgl %eax, %eax # sched: [1:0.33]
; SANDY-NEXT: xchgl %ecx, %eax # sched: [1:0.33]
; SANDY-NEXT: xchgl %eax, (%edx) # sched: [5:1.00]
; SANDY-NEXT: #NO_APP
; SANDY-NEXT: retl # sched: [5:1.00]
;
; HASWELL-LABEL: test_xchg_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: movl {{[0-9]+}}(%esp), %edx # sched: [5:0.50]
; HASWELL-NEXT: #APP
; HASWELL-NEXT: xchgl %eax, %eax # sched: [1:0.25]
; HASWELL-NEXT: xchgl %ecx, %eax # sched: [1:0.25]
; HASWELL-NEXT: xchgl %eax, (%edx) # sched: [9:1.00]
; HASWELL-NEXT: #NO_APP
; HASWELL-NEXT: retl # sched: [7:1.00]
;
; BROADWELL-LABEL: test_xchg_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: movl {{[0-9]+}}(%esp), %edx # sched: [5:0.50]
; BROADWELL-NEXT: #APP
; BROADWELL-NEXT: xchgl %eax, %eax # sched: [1:0.25]
; BROADWELL-NEXT: xchgl %ecx, %eax # sched: [1:0.25]
; BROADWELL-NEXT: xchgl %eax, (%edx) # sched: [8:1.00]
; BROADWELL-NEXT: #NO_APP
; BROADWELL-NEXT: retl # sched: [6:0.50]
;
; SKYLAKE-LABEL: test_xchg_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: movl {{[0-9]+}}(%esp), %edx # sched: [5:0.50]
; SKYLAKE-NEXT: #APP
; SKYLAKE-NEXT: xchgl %eax, %eax # sched: [1:0.25]
; SKYLAKE-NEXT: xchgl %ecx, %eax # sched: [1:0.25]
; SKYLAKE-NEXT: xchgl %eax, (%edx) # sched: [10:1.25]
; SKYLAKE-NEXT: #NO_APP
; SKYLAKE-NEXT: retl # sched: [6:0.50]
;
; SKX-LABEL: test_xchg_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: movl {{[0-9]+}}(%esp), %edx # sched: [5:0.50]
; SKX-NEXT: #APP
; SKX-NEXT: xchgl %eax, %eax # sched: [1:0.25]
; SKX-NEXT: xchgl %ecx, %eax # sched: [1:0.25]
; SKX-NEXT: xchgl %eax, (%edx) # sched: [10:1.25]
; SKX-NEXT: #NO_APP
; SKX-NEXT: retl # sched: [6:0.50]
;
; BTVER2-LABEL: test_xchg_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: movl {{[0-9]+}}(%esp), %edx # sched: [5:1.00]
; BTVER2-NEXT: #APP
; BTVER2-NEXT: xchgl %eax, %eax # sched: [1:0.50]
; BTVER2-NEXT: xchgl %ecx, %eax # sched: [1:0.50]
; BTVER2-NEXT: xchgl %eax, (%edx) # sched: [4:1.00]
; BTVER2-NEXT: #NO_APP
; BTVER2-NEXT: retl # sched: [4:1.00]
;
; ZNVER1-LABEL: test_xchg_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: movl {{[0-9]+}}(%esp), %edx # sched: [8:0.50]
; ZNVER1-NEXT: #APP
; ZNVER1-NEXT: xchgl %eax, %eax # sched: [1:0.50]
; ZNVER1-NEXT: xchgl %ecx, %eax # sched: [1:0.50]
; ZNVER1-NEXT: xchgl %eax, (%edx) # sched: [5:0.50]
; ZNVER1-NEXT: #NO_APP
; ZNVER1-NEXT: retl # sched: [1:0.50]
tail
call
void
asm
"xchg %EAX, $0 \0A\09 xchg $1, $0 \0A\09 xchg $2, $0"
,
"r,r,*m"
(
i32
%a0
,
i32
%a1
,
i32
*
%a2
)
nounwind
ret
void
}
This diff is collapsed.
Click to expand it.
llvm/test/CodeGen/X86/schedule-x86_64.ll
+
362
−
1
View file @
1df18ee3
...
@@ -15204,7 +15204,368 @@ define void @test_xadd_64(i64 %a0, i64 %a1, i64 *%a2) optsize {
...
@@ -15204,7 +15204,368 @@ define void @test_xadd_64(i64 %a0, i64 %a1, i64 *%a2) optsize {
ret void
ret void
}
}
; TODO - test_xchg
define void @test_xchg_8(i8 %a0, i8 %a1, i8 *%a2) optsize {
; GENERIC-LABEL: test_xchg_8:
; GENERIC: # %bb.0:
; GENERIC-NEXT: #APP
; GENERIC-NEXT: xchgb %sil, %dil # sched: [1:0.33]
; GENERIC-NEXT: xchgb %dil, (%rdx) # sched: [5:1.00]
; GENERIC-NEXT: #NO_APP
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_xchg_8:
; ATOM: # %bb.0:
; ATOM-NEXT: #APP
; ATOM-NEXT: xchgb %sil, %dil # sched: [2:1.00]
; ATOM-NEXT: xchgb %dil, (%rdx) # sched: [3:1.50]
; ATOM-NEXT: #NO_APP
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_xchg_8:
; SLM: # %bb.0:
; SLM-NEXT: #APP
; SLM-NEXT: xchgb %sil, %dil # sched: [1:0.50]
; SLM-NEXT: xchgb %dil, (%rdx) # sched: [4:2.00]
; SLM-NEXT: #NO_APP
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_xchg_8:
; SANDY: # %bb.0:
; SANDY-NEXT: #APP
; SANDY-NEXT: xchgb %sil, %dil # sched: [1:0.33]
; SANDY-NEXT: xchgb %dil, (%rdx) # sched: [5:1.00]
; SANDY-NEXT: #NO_APP
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_xchg_8:
; HASWELL: # %bb.0:
; HASWELL-NEXT: #APP
; HASWELL-NEXT: xchgb %sil, %dil # sched: [3:0.75]
; HASWELL-NEXT: xchgb %dil, (%rdx) # sched: [9:1.00]
; HASWELL-NEXT: #NO_APP
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_xchg_8:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: #APP
; BROADWELL-NEXT: xchgb %sil, %dil # sched: [3:0.75]
; BROADWELL-NEXT: xchgb %dil, (%rdx) # sched: [8:1.00]
; BROADWELL-NEXT: #NO_APP
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_xchg_8:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: #APP
; SKYLAKE-NEXT: xchgb %sil, %dil # sched: [3:0.75]
; SKYLAKE-NEXT: xchgb %dil, (%rdx) # sched: [10:1.25]
; SKYLAKE-NEXT: #NO_APP
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_xchg_8:
; SKX: # %bb.0:
; SKX-NEXT: #APP
; SKX-NEXT: xchgb %sil, %dil # sched: [3:0.75]
; SKX-NEXT: xchgb %dil, (%rdx) # sched: [10:1.25]
; SKX-NEXT: #NO_APP
; SKX-NEXT: retq # sched: [7:1.00]
;
; BTVER2-LABEL: test_xchg_8:
; BTVER2: # %bb.0:
; BTVER2-NEXT: #APP
; BTVER2-NEXT: xchgb %sil, %dil # sched: [1:0.50]
; BTVER2-NEXT: xchgb %dil, (%rdx) # sched: [4:1.00]
; BTVER2-NEXT: #NO_APP
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_xchg_8:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: #APP
; ZNVER1-NEXT: xchgb %sil, %dil # sched: [1:0.50]
; ZNVER1-NEXT: xchgb %dil, (%rdx) # sched: [5:0.50]
; ZNVER1-NEXT: #NO_APP
; ZNVER1-NEXT: retq # sched: [1:0.50]
tail call void asm "xchg $1, $0 \0A\09 xchg $2, $0", "r,r,*m"(i8 %a0, i8 %a1, i8 *%a2) nounwind
ret void
}
define void @test_xchg_16(i16 %a0, i16 %a1, i16 *%a2) optsize {
; GENERIC-LABEL: test_xchg_16:
; GENERIC: # %bb.0:
; GENERIC-NEXT: #APP
; GENERIC-NEXT: xchgw %di, %ax # sched: [1:0.33]
; GENERIC-NEXT: xchgw %si, %di # sched: [1:0.33]
; GENERIC-NEXT: xchgw %di, (%rdx) # sched: [5:1.00]
; GENERIC-NEXT: #NO_APP
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_xchg_16:
; ATOM: # %bb.0:
; ATOM-NEXT: #APP
; ATOM-NEXT: xchgw %di, %ax # sched: [2:1.00]
; ATOM-NEXT: xchgw %si, %di # sched: [2:1.00]
; ATOM-NEXT: xchgw %di, (%rdx) # sched: [3:1.50]
; ATOM-NEXT: #NO_APP
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_xchg_16:
; SLM: # %bb.0:
; SLM-NEXT: #APP
; SLM-NEXT: xchgw %di, %ax # sched: [1:0.50]
; SLM-NEXT: xchgw %si, %di # sched: [1:0.50]
; SLM-NEXT: xchgw %di, (%rdx) # sched: [4:2.00]
; SLM-NEXT: #NO_APP
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_xchg_16:
; SANDY: # %bb.0:
; SANDY-NEXT: #APP
; SANDY-NEXT: xchgw %di, %ax # sched: [1:0.33]
; SANDY-NEXT: xchgw %si, %di # sched: [1:0.33]
; SANDY-NEXT: xchgw %di, (%rdx) # sched: [5:1.00]
; SANDY-NEXT: #NO_APP
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_xchg_16:
; HASWELL: # %bb.0:
; HASWELL-NEXT: #APP
; HASWELL-NEXT: xchgw %di, %ax # sched: [1:0.25]
; HASWELL-NEXT: xchgw %si, %di # sched: [1:0.25]
; HASWELL-NEXT: xchgw %di, (%rdx) # sched: [9:1.00]
; HASWELL-NEXT: #NO_APP
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_xchg_16:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: #APP
; BROADWELL-NEXT: xchgw %di, %ax # sched: [1:0.25]
; BROADWELL-NEXT: xchgw %si, %di # sched: [1:0.25]
; BROADWELL-NEXT: xchgw %di, (%rdx) # sched: [8:1.00]
; BROADWELL-NEXT: #NO_APP
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_xchg_16:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: #APP
; SKYLAKE-NEXT: xchgw %di, %ax # sched: [1:0.25]
; SKYLAKE-NEXT: xchgw %si, %di # sched: [1:0.25]
; SKYLAKE-NEXT: xchgw %di, (%rdx) # sched: [10:1.25]
; SKYLAKE-NEXT: #NO_APP
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_xchg_16:
; SKX: # %bb.0:
; SKX-NEXT: #APP
; SKX-NEXT: xchgw %di, %ax # sched: [1:0.25]
; SKX-NEXT: xchgw %si, %di # sched: [1:0.25]
; SKX-NEXT: xchgw %di, (%rdx) # sched: [10:1.25]
; SKX-NEXT: #NO_APP
; SKX-NEXT: retq # sched: [7:1.00]
;
; BTVER2-LABEL: test_xchg_16:
; BTVER2: # %bb.0:
; BTVER2-NEXT: #APP
; BTVER2-NEXT: xchgw %di, %ax # sched: [1:0.50]
; BTVER2-NEXT: xchgw %si, %di # sched: [1:0.50]
; BTVER2-NEXT: xchgw %di, (%rdx) # sched: [4:1.00]
; BTVER2-NEXT: #NO_APP
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_xchg_16:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: #APP
; ZNVER1-NEXT: xchgw %di, %ax # sched: [1:0.50]
; ZNVER1-NEXT: xchgw %si, %di # sched: [1:0.50]
; ZNVER1-NEXT: xchgw %di, (%rdx) # sched: [5:0.50]
; ZNVER1-NEXT: #NO_APP
; ZNVER1-NEXT: retq # sched: [1:0.50]
tail call void asm "xchg %AX, $0 \0A\09 xchg $1, $0 \0A\09 xchg $2, $0", "r,r,*m"(i16 %a0, i16 %a1, i16 *%a2) nounwind
ret void
}
define void @test_xchg_32(i32 %a0, i32 %a1, i32 *%a2) optsize {
; GENERIC-LABEL: test_xchg_32:
; GENERIC: # %bb.0:
; GENERIC-NEXT: #APP
; GENERIC-NEXT: xchgl %edi, %eax # sched: [1:0.33]
; GENERIC-NEXT: xchgl %esi, %edi # sched: [1:0.33]
; GENERIC-NEXT: xchgl %edi, (%rdx) # sched: [5:1.00]
; GENERIC-NEXT: #NO_APP
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_xchg_32:
; ATOM: # %bb.0:
; ATOM-NEXT: #APP
; ATOM-NEXT: xchgl %edi, %eax # sched: [2:1.00]
; ATOM-NEXT: xchgl %esi, %edi # sched: [2:1.00]
; ATOM-NEXT: xchgl %edi, (%rdx) # sched: [3:1.50]
; ATOM-NEXT: #NO_APP
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_xchg_32:
; SLM: # %bb.0:
; SLM-NEXT: #APP
; SLM-NEXT: xchgl %edi, %eax # sched: [1:0.50]
; SLM-NEXT: xchgl %esi, %edi # sched: [1:0.50]
; SLM-NEXT: xchgl %edi, (%rdx) # sched: [4:2.00]
; SLM-NEXT: #NO_APP
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_xchg_32:
; SANDY: # %bb.0:
; SANDY-NEXT: #APP
; SANDY-NEXT: xchgl %edi, %eax # sched: [1:0.33]
; SANDY-NEXT: xchgl %esi, %edi # sched: [1:0.33]
; SANDY-NEXT: xchgl %edi, (%rdx) # sched: [5:1.00]
; SANDY-NEXT: #NO_APP
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_xchg_32:
; HASWELL: # %bb.0:
; HASWELL-NEXT: #APP
; HASWELL-NEXT: xchgl %edi, %eax # sched: [1:0.25]
; HASWELL-NEXT: xchgl %esi, %edi # sched: [1:0.25]
; HASWELL-NEXT: xchgl %edi, (%rdx) # sched: [9:1.00]
; HASWELL-NEXT: #NO_APP
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_xchg_32:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: #APP
; BROADWELL-NEXT: xchgl %edi, %eax # sched: [1:0.25]
; BROADWELL-NEXT: xchgl %esi, %edi # sched: [1:0.25]
; BROADWELL-NEXT: xchgl %edi, (%rdx) # sched: [8:1.00]
; BROADWELL-NEXT: #NO_APP
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_xchg_32:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: #APP
; SKYLAKE-NEXT: xchgl %edi, %eax # sched: [1:0.25]
; SKYLAKE-NEXT: xchgl %esi, %edi # sched: [1:0.25]
; SKYLAKE-NEXT: xchgl %edi, (%rdx) # sched: [10:1.25]
; SKYLAKE-NEXT: #NO_APP
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_xchg_32:
; SKX: # %bb.0:
; SKX-NEXT: #APP
; SKX-NEXT: xchgl %edi, %eax # sched: [1:0.25]
; SKX-NEXT: xchgl %esi, %edi # sched: [1:0.25]
; SKX-NEXT: xchgl %edi, (%rdx) # sched: [10:1.25]
; SKX-NEXT: #NO_APP
; SKX-NEXT: retq # sched: [7:1.00]
;
; BTVER2-LABEL: test_xchg_32:
; BTVER2: # %bb.0:
; BTVER2-NEXT: #APP
; BTVER2-NEXT: xchgl %edi, %eax # sched: [1:0.50]
; BTVER2-NEXT: xchgl %esi, %edi # sched: [1:0.50]
; BTVER2-NEXT: xchgl %edi, (%rdx) # sched: [4:1.00]
; BTVER2-NEXT: #NO_APP
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_xchg_32:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: #APP
; ZNVER1-NEXT: xchgl %edi, %eax # sched: [1:0.50]
; ZNVER1-NEXT: xchgl %esi, %edi # sched: [1:0.50]
; ZNVER1-NEXT: xchgl %edi, (%rdx) # sched: [5:0.50]
; ZNVER1-NEXT: #NO_APP
; ZNVER1-NEXT: retq # sched: [1:0.50]
tail call void asm "xchg %EAX, $0 \0A\09 xchg $1, $0 \0A\09 xchg $2, $0", "r,r,*m"(i32 %a0, i32 %a1, i32 *%a2) nounwind
ret void
}
define void @test_xchg_64(i64 %a0, i64 %a1, i64 *%a2) optsize {
; GENERIC-LABEL: test_xchg_64:
; GENERIC: # %bb.0:
; GENERIC-NEXT: #APP
; GENERIC-NEXT: xchgq %rdi, %rax # sched: [1:0.33]
; GENERIC-NEXT: xchgq %rsi, %rdi # sched: [1:0.33]
; GENERIC-NEXT: xchgq %rdi, (%rdx) # sched: [5:1.00]
; GENERIC-NEXT: #NO_APP
; GENERIC-NEXT: retq # sched: [1:1.00]
;
; ATOM-LABEL: test_xchg_64:
; ATOM: # %bb.0:
; ATOM-NEXT: #APP
; ATOM-NEXT: xchgq %rdi, %rax # sched: [2:1.00]
; ATOM-NEXT: xchgq %rsi, %rdi # sched: [2:1.00]
; ATOM-NEXT: xchgq %rdi, (%rdx) # sched: [3:1.50]
; ATOM-NEXT: #NO_APP
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_xchg_64:
; SLM: # %bb.0:
; SLM-NEXT: #APP
; SLM-NEXT: xchgq %rdi, %rax # sched: [1:0.50]
; SLM-NEXT: xchgq %rsi, %rdi # sched: [1:0.50]
; SLM-NEXT: xchgq %rdi, (%rdx) # sched: [4:2.00]
; SLM-NEXT: #NO_APP
; SLM-NEXT: retq # sched: [4:1.00]
;
; SANDY-LABEL: test_xchg_64:
; SANDY: # %bb.0:
; SANDY-NEXT: #APP
; SANDY-NEXT: xchgq %rdi, %rax # sched: [1:0.33]
; SANDY-NEXT: xchgq %rsi, %rdi # sched: [1:0.33]
; SANDY-NEXT: xchgq %rdi, (%rdx) # sched: [5:1.00]
; SANDY-NEXT: #NO_APP
; SANDY-NEXT: retq # sched: [1:1.00]
;
; HASWELL-LABEL: test_xchg_64:
; HASWELL: # %bb.0:
; HASWELL-NEXT: #APP
; HASWELL-NEXT: xchgq %rdi, %rax # sched: [1:0.25]
; HASWELL-NEXT: xchgq %rsi, %rdi # sched: [1:0.25]
; HASWELL-NEXT: xchgq %rdi, (%rdx) # sched: [9:1.00]
; HASWELL-NEXT: #NO_APP
; HASWELL-NEXT: retq # sched: [7:1.00]
;
; BROADWELL-LABEL: test_xchg_64:
; BROADWELL: # %bb.0:
; BROADWELL-NEXT: #APP
; BROADWELL-NEXT: xchgq %rdi, %rax # sched: [1:0.25]
; BROADWELL-NEXT: xchgq %rsi, %rdi # sched: [1:0.25]
; BROADWELL-NEXT: xchgq %rdi, (%rdx) # sched: [8:1.00]
; BROADWELL-NEXT: #NO_APP
; BROADWELL-NEXT: retq # sched: [7:1.00]
;
; SKYLAKE-LABEL: test_xchg_64:
; SKYLAKE: # %bb.0:
; SKYLAKE-NEXT: #APP
; SKYLAKE-NEXT: xchgq %rdi, %rax # sched: [1:0.25]
; SKYLAKE-NEXT: xchgq %rsi, %rdi # sched: [1:0.25]
; SKYLAKE-NEXT: xchgq %rdi, (%rdx) # sched: [10:1.25]
; SKYLAKE-NEXT: #NO_APP
; SKYLAKE-NEXT: retq # sched: [7:1.00]
;
; SKX-LABEL: test_xchg_64:
; SKX: # %bb.0:
; SKX-NEXT: #APP
; SKX-NEXT: xchgq %rdi, %rax # sched: [1:0.25]
; SKX-NEXT: xchgq %rsi, %rdi # sched: [1:0.25]
; SKX-NEXT: xchgq %rdi, (%rdx) # sched: [10:1.25]
; SKX-NEXT: #NO_APP
; SKX-NEXT: retq # sched: [7:1.00]
;
; BTVER2-LABEL: test_xchg_64:
; BTVER2: # %bb.0:
; BTVER2-NEXT: #APP
; BTVER2-NEXT: xchgq %rdi, %rax # sched: [1:0.50]
; BTVER2-NEXT: xchgq %rsi, %rdi # sched: [1:0.50]
; BTVER2-NEXT: xchgq %rdi, (%rdx) # sched: [4:1.00]
; BTVER2-NEXT: #NO_APP
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_xchg_64:
; ZNVER1: # %bb.0:
; ZNVER1-NEXT: #APP
; ZNVER1-NEXT: xchgq %rdi, %rax # sched: [1:0.50]
; ZNVER1-NEXT: xchgq %rsi, %rdi # sched: [1:0.50]
; ZNVER1-NEXT: xchgq %rdi, (%rdx) # sched: [5:0.50]
; ZNVER1-NEXT: #NO_APP
; ZNVER1-NEXT: retq # sched: [1:0.50]
tail call void asm "xchg %RAX, $0 \0A\09 xchg $1, $0 \0A\09 xchg $2, $0", "r,r,*m"(i64 %a0, i64 %a1, i64 *%a2) nounwind
ret void
}
define void @test_xlat() optsize {
define void @test_xlat() optsize {
; GENERIC-LABEL: test_xlat:
; GENERIC-LABEL: test_xlat:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment