llvm.org GIT mirror llvm / 0120b67
Rewrite some of the test/CodeGen/X86 tests to use FileCheck instead of grep git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179241 91177308-0d34-0410-b5e6-96231b3b80d8 Eli Bendersky 6 years ago
11 changed file(s) with 31 addition(s) and 15 deletion(s). Raw diff Collapse all Expand all
None ; RUN: llc -fast-isel -march=x86 < %s | grep %fs:
0 ; RUN: llc -fast-isel -march=x86 < %s | FileCheck %s
1 ; CHECK: %fs:
12
23 define i32 @test1(i32 addrspace(257)* %arg) nounwind {
34 %tmp = load i32 addrspace(257)* %arg
None ; RUN: llc < %s -mcpu=generic -march=x86 -x86-asm-syntax=intel | \
1 ; RUN: grep "add ESP, 8"
0 ; RUN: llc < %s -mcpu=generic -march=x86 -x86-asm-syntax=intel | FileCheck %s
1 ; CHECK: add ESP, 8
22
33 target triple = "i686-pc-linux-gnu"
44
None ; RUN: llc -O0 -relocation-model=pic < %s | not grep call
0 ; RUN: llc -O0 -relocation-model=pic < %s | FileCheck %s
1 ; CHECK-NOT: call
12 ; rdar://8396318
23
34 ; Don't emit a PIC base register if no addresses are needed.
None ; RUN: llc < %s -fast-isel | grep "LCPI0_0(%rip)"
0 ; RUN: llc < %s -fast-isel | FileCheck %s
1 ; CHECK: LCPI0_0(%rip)
2
13 ; Make sure fast isel uses rip-relative addressing when required.
24 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
35 target triple = "x86_64-apple-darwin9.0"
0 ; RUN: llc < %s -fast-isel -fast-isel-abort -mtriple=x86_64-apple-darwin10 | FileCheck %s
1 ; RUN: llc < %s -fast-isel -march=x86 -mattr=+sse2 | grep xor | count 2
1 ; RUN: llc < %s -fast-isel -march=x86 -mattr=+sse2 | FileCheck --check-prefix=SSE2 %s
2
3 ; SSE2: xor
4 ; SSE2: xor
25
36 ; CHECK: doo:
47 ; CHECK: xor
None ; RUN: llc < %s -fast-isel | grep "_kill@GOTPCREL(%rip)"
0 ; RUN: llc < %s -fast-isel | FileCheck %s
1 ; CHECK: _kill@GOTPCREL(%rip)
2
13 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
24 target triple = "x86_64-apple-darwin10.0"
35 @f = global i8 (...)* @kill ; [#uses=1]
None ; RUN: llc < %s -fast-isel -tailcallopt -march=x86 | not grep add
0 ; RUN: llc < %s -fast-isel -tailcallopt -march=x86 | FileCheck %s
1 ; CHECK-NOT: add
12 ; PR4154
23
34 ; On x86, -tailcallopt changes the ABI so the caller shouldn't readjust
None ; RUN: llc < %s -mtriple=i686-apple-darwin -mattr=+sse2 | grep movsd
1 ; RUN: llc < %s -mtriple=i686-apple-darwin -mattr=+sse2 | grep mov | count 1
0 ; RUN: llc < %s -mtriple=i686-apple-darwin -mattr=+sse2 | FileCheck %s
1 ; CHECK: movsd
2 ; CHECK-NOT: mov
23
34 define i32 @foo() nounwind {
45 entry:
None ; RUN: llc < %s -tailcallopt=false | grep "movl[[:space:]]*8(%esp), %eax" | count 2
0 ; RUN: llc < %s -tailcallopt=false | FileCheck %s
1 ; CHECK: movl 8(%esp), %eax
2 ; CHECK: movl 8(%esp), %eax
3
14 ; PR3122
25 ; rdar://6400815
36
None ; RUN: llc < %s -march=x86 -tailcallopt=false | grep ret | not grep 4
0 ; RUN: llc < %s -march=x86 -tailcallopt=false | FileCheck %s
1 ; CHECK: ret{{[^4]*$}}
12
23 %struct.foo = type { [4 x i32] }
34
0 ; RUN: llc < %s -march=x86 -o %t
1 ; RUN: grep "movl .48, %ecx" %t
2 ; RUN: grep "movl .24, %edx" %t
3 ; RUN: grep "movl .12, %eax" %t
1 ; RUN: FileCheck %s -input-file %t
2 ; CHECK: movl {{.}}12, %eax
3 ; CHECK: movl {{.}}24, %edx
4 ; CHECK: movl {{.}}48, %ecx
45
56 %0 = type { i32, i32, i32 }
67