llvm.org GIT mirror llvm / c5b822b
Convert several tests to use temporary files instead of redundantly executing the test commands. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52163 91177308-0d34-0410-b5e6-96231b3b80d8 Dan Gohman 11 years ago
14 changed file(s) with 63 addition(s) and 60 deletion(s). Raw diff Collapse all Expand all
0 ; RUN: llvm-as < %s | \
1 ; RUN: llc -march=x86 -mtriple=i686-apple-darwin8 -relocation-model=static | \
2 ; RUN: grep {movl _last} | count 1
3 ; RUN: llvm-as < %s | \
4 ; RUN: llc -march=x86 -mtriple=i686-apple-darwin8 -relocation-model=static | \
5 ; RUN: grep {cmpl.*_last} | count 1
1 ; RUN: llc -march=x86 -mtriple=i686-apple-darwin8 -relocation-model=static > %t
2 ; RUN: grep {movl _last} %t | count 1
3 ; RUN: grep {cmpl.*_last} %t | count 1
64
75 @block = external global i8* ; [#uses=1]
86 @last = external global i32 ; [#uses=3]
0 ; PR850
1 ; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=att | \
2 ; RUN: grep {movl 4(%eax),%ebp}
3 ; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=att | \
4 ; RUN: grep {movl 0(%eax), %ebx}
1 ; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=att > %t
2 ; RUN: grep {movl 4(%eax),%ebp} %t
3 ; RUN: grep {movl 0(%eax), %ebx} %t
54
65 define i32 @foo(i32 %__s.i.i, i32 %tmp5.i.i, i32 %tmp6.i.i, i32 %tmp7.i.i, i32 %tmp8.i.i) {
76 %tmp9.i.i = call i32 asm sideeffect "push %ebp\0Apush %ebx\0Amovl 4($2),%ebp\0Amovl 0($2), %ebx\0Amovl $1,%eax\0Aint $$0x80\0Apop %ebx\0Apop %ebp", "={ax},i,0,{cx},{dx},{si},{di}"( i32 192, i32 %__s.i.i, i32 %tmp5.i.i, i32 %tmp6.i.i, i32 %tmp7.i.i, i32 %tmp8.i.i ) ; [#uses=1]
None ; RUN: llvm-as < %s | llc -march=x86-64 | \
1 ; RUN: grep movb | count 2
2 ; RUN: llvm-as < %s | llc -march=x86-64 | \
3 ; RUN: grep movzbw
0 ; RUN: llvm-as < %s | llc -march=x86-64 > %t
1 ; RUN: grep movb %t | count 2
2 ; RUN: grep movzbw %t
43
54
65 define void @handle_vector_size_attribute() {
None ; RUN: llvm-as < %s | llc -march=x86-64 | grep leaq
1 ; RUN: llvm-as < %s | llc -march=x86-64 | not grep {,%rsp)}
0 ; RUN: llvm-as < %s | llc -march=x86-64 > %t
1 ; RUN: grep leaq %t
2 ; RUN: not grep {,%rsp)} %t
23 ; PR1103
34
45 target datalayout = "e-p:64:64"
None ; RUN: llvm-as < %s | llc -mtriple=x86_64-apple-darwin | grep movl | not grep {r\[abcd\]x}
1 ; RUN: llvm-as < %s | llc -mtriple=x86_64-apple-darwin | grep movl | not grep {r\[ds\]i}
2 ; RUN: llvm-as < %s | llc -mtriple=x86_64-apple-darwin | grep movl | not grep {r\[bs\]p}
0 ; RUN: llvm-as < %s | llc -mtriple=x86_64-apple-darwin | grep movl > %t
1 ; RUN: not grep {r\[abcd\]x} %t
2 ; RUN: not grep {r\[ds\]i} %t
3 ; RUN: not grep {r\[bs\]p} %t
34
45 %struct.BITMAP = type { i16, i16, i32, i32, i32, i32, i32, i32, i8*, i8* }
56 %struct.BltData = type { float, float, float, float }
None ; RUN: llvm-as < %s | opt -std-compile-opts | llc | grep 2147027116 | count 3
1 ; RUN: llvm-as < %s | opt -std-compile-opts | llc | grep 2147228864 | count 3
2 ; RUN: llvm-as < %s | opt -std-compile-opts | llc | grep 2146502828 | count 3
3 ; RUN: llvm-as < %s | opt -std-compile-opts | llc | grep 2143034560 | count 3
0 ; RUN: llvm-as < %s | opt -std-compile-opts | llc > %t
1 ; RUN: grep 2147027116 %t | count 3
2 ; RUN: grep 2147228864 %t | count 3
3 ; RUN: grep 2146502828 %t | count 3
4 ; RUN: grep 2143034560 %t | count 3
45 ; Compile time conversions of NaNs.
56 ; ModuleID = 'nan2.c'
67 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:128:128"
None ; RUN: llvm-as < %s | llc -march=x86 | grep foos+5
1 ; RUN: llvm-as < %s | llc -march=x86 | grep foos+1
2 ; RUN: llvm-as < %s | llc -march=x86 | grep foos+9
3 ; RUN: llvm-as < %s | llc -march=x86 | grep bara+19
4 ; RUN: llvm-as < %s | llc -march=x86 | grep bara+4
0 ; RUN: llvm-as < %s | llc -march=x86 > %t
1 ; RUN: grep foos+5 %t
2 ; RUN: grep foos+1 %t
3 ; RUN: grep foos+9 %t
4 ; RUN: grep bara+19 %t
5 ; RUN: grep bara+4 %t
56
67 ; make sure we compute the correct offset for a packed structure
78
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse | grep prefetchnta
1 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse | grep prefetcht0
2 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse | grep prefetcht1
3 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse | grep prefetcht2
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse > %t
1 ; RUN: grep prefetchnta %t
2 ; RUN: grep prefetcht0 %t
3 ; RUN: grep prefetcht1 %t
4 ; RUN: grep prefetcht2 %t
45
56 define void @t(i8* %ptr) nounwind {
67 entry:
None ; RUN: llvm-as < %s | llc -march=x86-64 | grep unpck | count 2
1 ; RUN: llvm-as < %s | llc -march=x86-64 | grep shuf | count 2
2 ; RUN: llvm-as < %s | llc -march=x86-64 | grep ps | count 4
3 ; RUN: llvm-as < %s | llc -march=x86-64 | grep pd | count 4
4 ; RUN: llvm-as < %s | llc -march=x86-64 | grep movup | count 4
0 ; RUN: llvm-as < %s | llc -march=x86-64 > %t
1 ; RUN: grep unpck %t | count 2
2 ; RUN: grep shuf %t | count 2
3 ; RUN: grep ps %t | count 4
4 ; RUN: grep pd %t | count 4
5 ; RUN: grep movup %t | count 4
56
67 define <4 x float> @a(<4 x float>* %y) nounwind {
78 %x = load <4 x float>* %y, align 4
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep psllq | grep 32
1 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep pslldq | grep 12
2 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep psrldq | grep 8
3 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep psrldq | grep 12
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 > %t
1 ; RUN: grep psllq %t | grep 32
2 ; RUN: grep pslldq %t | grep 12
3 ; RUN: grep psrldq %t | grep 8
4 ; RUN: grep psrldq %t | grep 12
45
56 define void @t1(i32 %a, <1 x i64>* %P) nounwind {
67 %tmp12 = shl i32 %a, 12
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2
1 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep xorps | count 2
2 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep andnps
3 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movaps | count 2
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 > %t
1 ; RUN: grep xorps %t | count 2
2 ; RUN: grep andnps %t
3 ; RUN: grep movaps %t | count 2
44
55 define void @t(<4 x float> %A) {
66 %tmp1277 = sub <4 x float> < float -0.000000e+00, float -0.000000e+00, float -0.000000e+00, float -0.000000e+00 >, %A
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2
1 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep xorps | count 1
2 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movaps | count 1
3 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | not grep shuf
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 > %t
1 ; RUN: grep xorps %t | count 1
2 ; RUN: grep movaps %t | count 1
3 ; RUN: not grep shuf %t
44
55 define <2 x double> @test() {
66 ret <2 x double> zeroinitializer
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2
1 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | not grep punpck
2 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep pextrw | count 4
3 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep pinsrw | count 6
4 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep pshuflw | count 3
5 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep pshufhw | count 2
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 > %t
1 ; RUN: not grep punpck %t
2 ; RUN: grep pextrw %t | count 4
3 ; RUN: grep pinsrw %t | count 6
4 ; RUN: grep pshuflw %t | count 3
5 ; RUN: grep pshufhw %t | count 2
66
77 define <8 x i16> @t1(<8 x i16>* %A, <8 x i16>* %B) {
88 %tmp1 = load <8 x i16>* %A
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2
1 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movlhps | count 1
2 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movss | count 1
3 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep pshufd | count 1
4 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep pshuflw | count 1
5 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep pshufhw | count 1
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 > %t
1 ; RUN: grep movlhps %t | count 1
2 ; RUN: grep movss %t | count 1
3 ; RUN: grep pshufd %t | count 1
4 ; RUN: grep pshuflw %t | count 1
5 ; RUN: grep pshufhw %t | count 1
66
77 define <8 x i16> @t1(<8 x i16> %A, <8 x i16> %B) nounwind {
88 %tmp = shufflevector <8 x i16> %A, <8 x i16> %B, <8 x i32> < i32 8, i32 9, i32 0, i32 1, i32 10, i32 11, i32 2, i32 3 >