summaryrefslogtreecommitdiff
path: root/test/CodeGen
diff options
context:
space:
mode:
authorPreston Gurd <preston.gurd@intel.com>2013-09-16 22:22:07 +0000
committerPreston Gurd <preston.gurd@intel.com>2013-09-16 22:22:07 +0000
commit0c190ad93f12027ec158eb2b0558d4ca375ecc39 (patch)
tree19dc77812936fed24245fc894ef34ee0c21630c7 /test/CodeGen
parentb06ea25b4c4cff341194279e01c08d23fa022378 (diff)
downloadllvm-0c190ad93f12027ec158eb2b0558d4ca375ecc39.tar.gz
llvm-0c190ad93f12027ec158eb2b0558d4ca375ecc39.tar.bz2
llvm-0c190ad93f12027ec158eb2b0558d4ca375ecc39.tar.xz
Add Atom Silvermont (slm) tests
- check that -mcpu=slm uses the call register indirect optimization - check that -mcpu=slm runs the scheduler - check that -mcpu=slm supports the movbe instruction git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190814 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rw-r--r--test/CodeGen/X86/atom-call-reg-indirect.ll10
-rw-r--r--test/CodeGen/X86/atom-sched.ll4
-rw-r--r--test/CodeGen/X86/movbe.ll9
3 files changed, 23 insertions, 0 deletions
diff --git a/test/CodeGen/X86/atom-call-reg-indirect.ll b/test/CodeGen/X86/atom-call-reg-indirect.ll
index 933b98b82c..48f2d4c113 100644
--- a/test/CodeGen/X86/atom-call-reg-indirect.ll
+++ b/test/CodeGen/X86/atom-call-reg-indirect.ll
@@ -2,6 +2,8 @@
; RUN: llc < %s -mcpu=core2 -mtriple=i686-linux | FileCheck -check-prefix=ATOM-NOT32 %s
; RUN: llc < %s -mcpu=atom -mtriple=x86_64-linux | FileCheck -check-prefix=ATOM64 %s
; RUN: llc < %s -mcpu=core2 -mtriple=x86_64-linux | FileCheck -check-prefix=ATOM-NOT64 %s
+; RUN: llc < %s -mcpu=slm -mtriple=i686-linux | FileCheck -check-prefix=SLM32 %s
+; RUN: llc < %s -mcpu=slm -mtriple=x86_64-linux | FileCheck -check-prefix=SLM64 %s
; fn_ptr.ll
@@ -20,6 +22,10 @@ entry:
;ATOM64: movq (%rcx), %rcx
;ATOM64: callq *%rcx
;ATOM-NOT64: callq *(%rcx)
+ ;SLM32: movl (%ecx), %ecx
+ ;SLM32: calll *%ecx
+ ;SLM64: movq (%rcx), %rcx
+ ;SLM64: callq *%rcx
tail call void %1(%class.A* %call)
ret i32 0
}
@@ -40,6 +46,10 @@ entry:
;ATOM64: movq (%rax), %rax
;ATOM64: callq *%rax
;ATOM-NOT64: callq *(%rax)
+ ;SLM32: movl (%eax), %eax
+ ;SLM32: calll *%eax
+ ;SLM64: movq (%rax), %rax
+ ;SLM64: callq *%rax
tail call void %1(i32 2)
ret i32 0
}
diff --git a/test/CodeGen/X86/atom-sched.ll b/test/CodeGen/X86/atom-sched.ll
index 0d97e85358..fd18472bff 100644
--- a/test/CodeGen/X86/atom-sched.ll
+++ b/test/CodeGen/X86/atom-sched.ll
@@ -1,4 +1,5 @@
; RUN: llc <%s -O2 -mcpu=atom -march=x86 -relocation-model=static | FileCheck -check-prefix=atom %s
+; RUN: llc <%s -O2 -mcpu=slm -march=x86 -relocation-model=static | FileCheck -check-prefix=slm %s
; RUN: llc <%s -O2 -mcpu=core2 -march=x86 -relocation-model=static | FileCheck %s
;
@@ -13,6 +14,9 @@ define void @func() nounwind uwtable {
; atom: imull
; atom-NOT: movl
; atom: imull
+; slm: imull
+; slm-NOT: movl
+; slm: imull
; CHECK: imull
; CHECK: movl
; CHECK: imull
diff --git a/test/CodeGen/X86/movbe.ll b/test/CodeGen/X86/movbe.ll
index aa58c1060e..3f459be70d 100644
--- a/test/CodeGen/X86/movbe.ll
+++ b/test/CodeGen/X86/movbe.ll
@@ -1,4 +1,5 @@
; RUN: llc -mtriple=x86_64-linux -mcpu=atom < %s | FileCheck %s
+; RUN: llc -mtriple=x86_64-linux -mcpu=slm < %s | FileCheck %s -check-prefix=SLM
declare i32 @llvm.bswap.i32(i32) nounwind readnone
declare i64 @llvm.bswap.i64(i64) nounwind readnone
@@ -9,6 +10,8 @@ define void @test1(i32* nocapture %x, i32 %y) nounwind {
ret void
; CHECK-LABEL: test1:
; CHECK: movbel %esi, (%rdi)
+; SLM-LABEL: test1:
+; SLM: movbel %esi, (%rdi)
}
define i32 @test2(i32* %x) nounwind {
@@ -17,6 +20,8 @@ define i32 @test2(i32* %x) nounwind {
ret i32 %bswap
; CHECK-LABEL: test2:
; CHECK: movbel (%rdi), %eax
+; SLM-LABEL: test2:
+; SLM: movbel (%rdi), %eax
}
define void @test3(i64* %x, i64 %y) nounwind {
@@ -25,6 +30,8 @@ define void @test3(i64* %x, i64 %y) nounwind {
ret void
; CHECK-LABEL: test3:
; CHECK: movbeq %rsi, (%rdi)
+; SLM-LABEL: test3:
+; SLM: movbeq %rsi, (%rdi)
}
define i64 @test4(i64* %x) nounwind {
@@ -33,4 +40,6 @@ define i64 @test4(i64* %x) nounwind {
ret i64 %bswap
; CHECK-LABEL: test4:
; CHECK: movbeq (%rdi), %rax
+; SLM-LABEL: test4:
+; SLM: movbeq (%rdi), %rax
}