Fix remaining lit tests which were failing when run on an Atom
authorPreston Gurd <preston.gurd@intel.com>
Thu, 19 Jul 2012 18:53:21 +0000 (18:53 +0000)
committerPreston Gurd <preston.gurd@intel.com>
Thu, 19 Jul 2012 18:53:21 +0000 (18:53 +0000)
processor.

Patches by Tyler Nowicki, Andy Zhang, and Preston Gurd!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160520 91177308-0d34-0410-b5e6-96231b3b80d8

12 files changed:
test/CodeGen/X86/2009-04-21-NoReloadImpDef.ll
test/CodeGen/X86/2011-06-03-x87chain.ll
test/CodeGen/X86/dbg-merge-loc-entry.ll
test/CodeGen/X86/dynamic-allocas-VLAs.ll
test/CodeGen/X86/fast-isel-mem.ll
test/CodeGen/X86/force-align-stack-alloca.ll
test/CodeGen/X86/liveness-local-regalloc.ll
test/CodeGen/X86/lsr-loop-exit-cond.ll
test/CodeGen/X86/lsr-static-addr.ll
test/CodeGen/X86/rdrand.ll
test/CodeGen/X86/thiscall-struct-return.ll
test/CodeGen/X86/tls-pie.ll

index 9f5a8c53be1839ec48fa5cd23672a5c97b2fad45..5cb05e8a796fa6490cb9924543ebc8a7fadf2e80 100644 (file)
@@ -1,5 +1,5 @@
 ; RUN: llc -mtriple=i386-apple-darwin10.0 -relocation-model=pic -asm-verbose=false \
 ; RUN: llc -mtriple=i386-apple-darwin10.0 -relocation-model=pic -asm-verbose=false \
-; RUN:     -disable-fp-elim -mattr=-sse41,-sse3,+sse2 -post-RA-scheduler=false -regalloc=basic < %s | \
+; RUN:     -mcpu=generic -disable-fp-elim -mattr=-sse41,-sse3,+sse2 -post-RA-scheduler=false -regalloc=basic < %s | \
 ; RUN:   FileCheck %s
 ; rdar://6808032
 
 ; RUN:   FileCheck %s
 ; rdar://6808032
 
index bf7f583aab73279da7f8136573139fa08101cbfc..ce63c74fbdfd3e19b76be055d105cbb8102b69b6 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: llc < %s -march=x86 -mattr=+sse | FileCheck %s
+; RUN: llc < %s -mcpu=generic -march=x86 -mattr=+sse | FileCheck %s
 
 define float @chainfail1(i64* nocapture %a, i64* nocapture %b, i32 %x, i32 %y, float* nocapture %f) nounwind uwtable noinline ssp {
 entry:
 
 define float @chainfail1(i64* nocapture %a, i64* nocapture %b, i32 %x, i32 %y, float* nocapture %f) nounwind uwtable noinline ssp {
 entry:
index c35935f015aca72fb9777f8f453e7ed52956737c..d1e349f79d6fabe1c651cd600cdd4e76df3c77ea 100644 (file)
@@ -10,7 +10,7 @@ target triple = "x86_64-apple-darwin8"
 ;CHECK-NEXT:    .short  Lset
 ;CHECK-NEXT: Ltmp
 ;CHECK-NEXT:   .byte   85                      ## DW_OP_reg5
 ;CHECK-NEXT:    .short  Lset
 ;CHECK-NEXT: Ltmp
 ;CHECK-NEXT:   .byte   85                      ## DW_OP_reg5
-;CHECK-NEXT: Ltmp5
+;CHECK-NEXT: Ltmp
 ;CHECK-NEXT:   .quad   0
 ;CHECK-NEXT:   .quad   0
 
 ;CHECK-NEXT:   .quad   0
 ;CHECK-NEXT:   .quad   0
 
index 54ae39b7112eeef45c99504377edfc41fd9aa8ef..c5e47facf34689fadc0f36cd99617ff31ff1118c 100644 (file)
@@ -1,5 +1,5 @@
-; RUN: llc < %s -march=x86-64 -mattr=+avx -mtriple=i686-apple-darwin10 | FileCheck %s
-; RUN: llc < %s -force-align-stack -stack-alignment=32 -march=x86-64 -mattr=+avx -mtriple=i686-apple-darwin10 | FileCheck %s -check-prefix=FORCE-ALIGN
+; RUN: llc < %s -mcpu=generic -march=x86-64 -mattr=+avx -mtriple=i686-apple-darwin10 | FileCheck %s
+; RUN: llc < %s -mcpu=generic -force-align-stack -stack-alignment=32 -march=x86-64 -mattr=+avx -mtriple=i686-apple-darwin10 | FileCheck %s -check-prefix=FORCE-ALIGN
 ; rdar://11496434
 
 ; no VLAs or dynamic alignment
 ; rdar://11496434
 
 ; no VLAs or dynamic alignment
index 8db1936bc20ea6557785cae31262074a84e7da73..52b1e8564338e5075470e8dc9dd02b357ef00cd0 100644 (file)
@@ -1,4 +1,5 @@
-; RUN: llc < %s -fast-isel -mtriple=i386-apple-darwin | FileCheck %s
+; RUN: llc < %s -fast-isel -mtriple=i386-apple-darwin -mcpu=generic | FileCheck %s
+; RUN: llc < %s -fast-isel -mtriple=i386-apple-darwin -mcpu=atom | FileCheck -check-prefix=ATOM %s
 
 @src = external global i32
 
 
 @src = external global i32
 
@@ -18,6 +19,13 @@ entry:
 ; CHECK:       movl    %eax, (%ecx)
 ; CHECK:       ret
 
 ; CHECK:       movl    %eax, (%ecx)
 ; CHECK:       ret
 
+; ATOM:        loadgv:
+; ATOM:                movl    L_src$non_lazy_ptr, %ecx
+; ATOM:         movl    (%ecx), %eax
+; ATOM:         addl    (%ecx), %eax
+; ATOM:         movl    %eax, (%ecx)
+; ATOM:         ret
+
 }
 
 %stuff = type { i32 (...)** }
 }
 
 %stuff = type { i32 (...)** }
@@ -31,4 +39,8 @@ entry:
 ; CHECK:       movl    $0, %eax
 ; CHECK:       movl    L_LotsStuff$non_lazy_ptr, %ecx
 
 ; CHECK:       movl    $0, %eax
 ; CHECK:       movl    L_LotsStuff$non_lazy_ptr, %ecx
 
+; ATOM: _t:
+; ATOM:         movl    L_LotsStuff$non_lazy_ptr, %ecx
+; ATOM:         movl    $0, %eax
+
 }
 }
index 6d4455943709fdd4ec479a3beba81ebf5b818263..4ab906797a25afbafc5ab7c97db2f934bb493d6c 100644 (file)
@@ -3,7 +3,7 @@
 ; arbitrarily force alignment up to 32-bytes for i386 hoping that this will
 ; exceed any ABI provisions.
 ;
 ; arbitrarily force alignment up to 32-bytes for i386 hoping that this will
 ; exceed any ABI provisions.
 ;
-; RUN: llc < %s -force-align-stack -stack-alignment=32 | FileCheck %s
+; RUN: llc < %s -mcpu=generic -force-align-stack -stack-alignment=32 | FileCheck %s
 
 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32-S128"
 target triple = "i386-unknown-linux-gnu"
 
 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32-S128"
 target triple = "i386-unknown-linux-gnu"
index 721f545985d7fb16731f1f1581638751cd6d995b..faeeaa7e9c4f7449944ff8ee31faf4b8ab14bd4a 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: llc < %s -regalloc=fast -optimize-regalloc=0 -verify-machineinstrs -mtriple=x86_64-apple-darwin10
+; RUN: llc < %s -mcpu=generic -regalloc=fast -optimize-regalloc=0 -verify-machineinstrs -mtriple=x86_64-apple-darwin10
 ; <rdar://problem/7755473>
 ; PR12821
 
 ; <rdar://problem/7755473>
 ; PR12821
 
index ebda9f201df968eaa67d18050c18e99da156d55a..6e8d0bfdfe31b0c9d834bf819d83043c0217715f 100644 (file)
@@ -1,10 +1,16 @@
-; RUN: llc -mtriple=x86_64-darwin < %s | FileCheck %s
+; RUN: llc -mtriple=x86_64-darwin -mcpu=generic < %s | FileCheck %s
+; RUN: llc -mtriple=x86_64-darwin -mcpu=atom < %s | FileCheck -check-prefix=ATOM %s
 
 ; CHECK: t:
 ; CHECK: decq
 
 ; CHECK: t:
 ; CHECK: decq
-; CHECK-NEXT: movl (
+; CHECK-NEXT: movl (%r11,%rax,4), %eax
 ; CHECK-NEXT: jne
 
 ; CHECK-NEXT: jne
 
+; ATOM: t:
+; ATOM: movl (%r10,%rax,4), %eax
+; ATOM-NEXT: decq
+; ATOM-NEXT: jne
+
 @Te0 = external global [256 x i32]             ; <[256 x i32]*> [#uses=5]
 @Te1 = external global [256 x i32]             ; <[256 x i32]*> [#uses=4]
 @Te3 = external global [256 x i32]             ; <[256 x i32]*> [#uses=2]
 @Te0 = external global [256 x i32]             ; <[256 x i32]*> [#uses=5]
 @Te1 = external global [256 x i32]             ; <[256 x i32]*> [#uses=4]
 @Te3 = external global [256 x i32]             ; <[256 x i32]*> [#uses=2]
@@ -149,6 +155,13 @@ bb2:               ; preds = %bb
 ; CHECK: jne
 ; CHECK: ret
 
 ; CHECK: jne
 ; CHECK: ret
 
+; ATOM: f:
+; ATOM: %for.body
+; ATOM: incl [[IV:%e..]]
+; ATOM: cmpl $1, [[IV]]
+; ATOM: jne
+; ATOM: ret
+
 define i32 @f(i32 %i, i32* nocapture %a) nounwind uwtable readonly ssp {
 entry:
   %cmp4 = icmp eq i32 %i, 1
 define i32 @f(i32 %i, i32* nocapture %a) nounwind uwtable readonly ssp {
 entry:
   %cmp4 = icmp eq i32 %i, 1
index c9ed3e553a4660fb306312576b5ddc5af0b54a10..6566f563784d8cdddd96f59f914ad7c1794a114f 100644 (file)
@@ -1,4 +1,5 @@
-; RUN: llc -march=x86-64 -mtriple=x86_64-unknown-linux-gnu -relocation-model=static -asm-verbose=false < %s | FileCheck %s
+; RUN: llc -march=x86-64 -mcpu=generic -mtriple=x86_64-unknown-linux-gnu -relocation-model=static -asm-verbose=false < %s | FileCheck %s
+; RUN: llc -march=x86-64 -mcpu=atom -mtriple=x86_64-unknown-linux-gnu -relocation-model=static -asm-verbose=false < %s | FileCheck -check-prefix=ATOM %s
 
 ; CHECK: xorl  %eax, %eax
 ; CHECK: movsd .LCPI0_0(%rip), %xmm0
 
 ; CHECK: xorl  %eax, %eax
 ; CHECK: movsd .LCPI0_0(%rip), %xmm0
@@ -9,6 +10,15 @@
 ; CHECK-NEXT: movsd
 ; CHECK-NEXT: incq %rax
 
 ; CHECK-NEXT: movsd
 ; CHECK-NEXT: incq %rax
 
+; ATOM: movsd .LCPI0_0(%rip), %xmm0
+; ATOM: xorl  %eax, %eax
+; ATOM: align
+; ATOM-NEXT: BB0_2:
+; ATOM-NEXT: movsd A(,%rax,8)
+; ATOM-NEXT: mulsd
+; ATOM-NEXT: movsd
+; ATOM-NEXT: incq %rax
+
 @A = external global [0 x double]
 
 define void @foo(i64 %n) nounwind {
 @A = external global [0 x double]
 
 define void @foo(i64 %n) nounwind {
index 27d1fe6b2753e8acea05e7d5b81f898cb6773477..e2224a6196769ebd2e98cf4fa5dc0fc2ebf9ac99 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: llc < %s -march=x86-64 -mattr=+rdrand | FileCheck %s
+; RUN: llc < %s -march=x86-64 -mcpu=core-avx-i -mattr=+rdrand | FileCheck %s
 declare {i16, i32} @llvm.x86.rdrand.16()
 declare {i32, i32} @llvm.x86.rdrand.32()
 declare {i64, i32} @llvm.x86.rdrand.64()
 declare {i16, i32} @llvm.x86.rdrand.16()
 declare {i32, i32} @llvm.x86.rdrand.32()
 declare {i64, i32} @llvm.x86.rdrand.64()
index a7be48355f69725dea0b1b8f76aae11c019d9207..0507cb890cd23509a00373f962ecc702bdf83bc4 100644 (file)
@@ -10,7 +10,7 @@ declare x86_thiscallcc void @_ZNK1C6MediumEv(%struct.M* noalias sret %agg.result
 
 define void @testv() nounwind {
 ; CHECK: testv:
 
 define void @testv() nounwind {
 ; CHECK: testv:
-; CHECK: leal
+; CHECK: leal 16(%esp), %esi
 ; CHECK-NEXT: movl     %esi, (%esp)
 ; CHECK-NEXT: calll _ZN1CC1Ev
 ; CHECK: leal 8(%esp), %eax
 ; CHECK-NEXT: movl     %esi, (%esp)
 ; CHECK-NEXT: calll _ZN1CC1Ev
 ; CHECK: leal 8(%esp), %eax
@@ -29,7 +29,7 @@ entry:
 
 define void @test2v() nounwind {
 ; CHECK: test2v:
 
 define void @test2v() nounwind {
 ; CHECK: test2v:
-; CHECK: leal
+; CHECK: leal 16(%esp), %esi
 ; CHECK-NEXT: movl     %esi, (%esp)
 ; CHECK-NEXT: calll _ZN1CC1Ev
 ; CHECK: leal 8(%esp), %eax
 ; CHECK-NEXT: movl     %esi, (%esp)
 ; CHECK-NEXT: calll _ZN1CC1Ev
 ; CHECK: leal 8(%esp), %eax
index 8269c43b9a7678f0c409a9383868bc140c6da8fd..3fca9f5a379109b33972523528f2292ad772de4c 100644 (file)
@@ -1,6 +1,6 @@
-; RUN: llc < %s -march=x86 -mtriple=i386-linux-gnu -relocation-model=pic -enable-pie \
+; RUN: llc < %s -march=x86 -mcpu=generic -mtriple=i386-linux-gnu -relocation-model=pic -enable-pie \
 ; RUN:   | FileCheck -check-prefix=X32 %s
 ; RUN:   | FileCheck -check-prefix=X32 %s
-; RUN: llc < %s -march=x86-64 -mtriple=x86_64-linux-gnu -relocation-model=pic -enable-pie \
+; RUN: llc < %s -march=x86-64 -mcpu=generic -mtriple=x86_64-linux-gnu -relocation-model=pic -enable-pie \
 ; RUN:   | FileCheck -check-prefix=X64 %s
 
 @i = thread_local global i32 15
 ; RUN:   | FileCheck -check-prefix=X64 %s
 
 @i = thread_local global i32 15