llvm.org GIT mirror llvm / d3b1f6d
For PR1319: Upgrade to new test harness. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36091 91177308-0d34-0410-b5e6-96231b3b80d8 Reid Spencer 12 years ago
55 changed file(s) with 133 addition(s) and 91 deletion(s). Raw diff Collapse all Expand all
None load_lib llvm-dg.exp
0 load_lib llvm.exp
11
2 llvm-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]]
2 RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]]
None ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep '.byte[[:space:]]*true'
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | \
1 ; RUN: not grep {.byte\[\[:space:\]\]*true}
12
23 %X = global bool true
34
None ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep '(%esp'
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep {(%esp}
11
22 declare sbyte* %llvm.returnaddress(uint)
33 declare sbyte* %llvm.frameaddress(uint)
None ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep 'j[lgbe]'
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep {j\[lgbe\]}
11
22 int %max(int %A, int %B) {
33 %gt = setgt int %A, %B
11 ; overlapping live intervals. When two overlapping intervals have the same
22 ; value, they can be joined though.
33 ;
4 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -regalloc=linearscan | not grep 'mov %[A-Z]\{2,3\}, %[A-Z]\{2,3\}'
4 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -regalloc=linearscan | \
5 ; RUN: not grep {mov %\[A-Z\]\\\{2,3\\\}, %\[A-Z\]\\\{2,3\\\}}
56
67 long %test(long %x) {
78 entry:
None ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep 'shld' | wc -l | grep 1
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | \
1 ; RUN: grep shld | wc -l | grep 1
12 ;
23 ; Check that the isel does not fold the shld, which already folds a load
34 ; and has two uses, into a store.
None ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mtriple=i686-apple-darwin8 -relocation-model=static | grep 'movl _last' | wc -l | grep 1 &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mtriple=i686-apple-darwin8 -relocation-model=static | grep 'cmpl.*_last' | wc -l | grep 1
0 ; RUN: llvm-upgrade < %s | llvm-as | \
1 ; RUN: llc -march=x86 -mtriple=i686-apple-darwin8 -relocation-model=static | \
2 ; RUN: grep {movl _last} | wc -l | grep 1
3 ; RUN: llvm-upgrade < %s | llvm-as | \
4 ; RUN: llc -march=x86 -mtriple=i686-apple-darwin8 -relocation-model=static | \
5 ; RUN: grep {cmpl.*_last} | wc -l | grep 1
26
37 %block = external global ubyte* ; [#uses=1]
48 %last = external global int ; [#uses=3]
0 ; Coalescing from R32 to a subset R32_. Once another register coalescer bug is
11 ; fixed, the movb should go away as well.
22
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -relocation-model=static | grep 'movl' | wc -l
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -relocation-model=static | \
4 ; RUN: grep movl | wc -l
45
56 %B = external global uint
67 %C = external global ushort*
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -stats 2>&1 |\
1 ; RUN: grep 'asm-printer' | grep 35
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -stats |&\
1 ; RUN: grep {asm-printer} | grep 35
22
33 target datalayout = "e-p:32:32"
44 define void @foo(i32* %mc, i32* %bp, i32* %ms, i32* %xmb, i32* %mpp, i32* %tpmm, i32* %ip, i32* %tpim, i32* %dpp, i32* %tpdm, i32* %bpi, i32 %M) {
None ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep 'setnp'
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -enable-unsafe-fp-math | not grep 'setnp'
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep setnp
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -enable-unsafe-fp-math | \
2 ; RUN: not grep setnp
33
44 uint %test(float %f) {
55 %tmp = seteq float %f, 0.000000e+00
None ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=att | grep 'movl 4(%eax),%ebp' &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=att | grep 'movl 0(%eax), %ebx'
2
3 ; PR850
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=att | \
2 ; RUN: grep {movl 4(%eax),%ebp}
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=att | \
4 ; RUN: grep {movl 0(%eax), %ebx}
45
56 int %foo(int %__s.i.i, int %tmp5.i.i, int %tmp6.i.i, int %tmp7.i.i, int %tmp8.i.i ) {
67
None ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mcpu=i386 | not grep 'movl %eax, %edx'
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mcpu=i386 | \
1 ; RUN: not grep {movl %eax, %edx}
12
23 int %foo(int %t, int %C) {
34 entry:
None ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep 'subl $4, %esp'
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep {subl \$4, %esp}
11
22 target triple = "i686-pc-linux-gnu"
33
None ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86-64 &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86-64 | not grep 'movb %sil, %ah' &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86-64 | grep 'movzbw %al, %ax'
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86-64 | \
1 ; RUN: not grep {movb %sil, %ah}
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86-64 | \
3 ; RUN: grep {movzbw %al, %ax}
34
45 void %handle_vector_size_attribute() {
56 entry:
None ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep 3721182122 | wc -l | grep 2 &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep -E 'movl _?bytes2' | wc -l | grep 1
3 ; PR1022, 1023
0 ; PR1022, PR1023
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | \
2 ; RUN: grep 3721182122 | wc -l | grep 2
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | \
4 ; RUN: grep -E {movl _?bytes2} | wc -l | grep 1
45
56 %fmt = constant [4 x sbyte] c"%x\0A\00"
67 %bytes = constant [4 x sbyte] c"\AA\BB\CC\DD"
0 ; PR1075
1 ; RUN: llvm-as < %s | llc -mtriple=x86_64-apple-darwin | \
1 ; RUN: %prcontext 'mulss LCPI1_3' 1 | grep mulss | wc -l | grep 1
2 ; PR1075
2 ; RUN: %prcontext {mulss LCPI1_3} 1 | grep mulss | wc -l | grep 1
33
44 define float @foo(float %x) {
55 %tmp1 = mul float %x, 3.000000e+00
None ; RUN: llvm-as < %s | llc -march=x86 | grep 'orl $1, %eax' &&
1 ; RUN: llvm-as < %s | llc -march=x86 | grep 'leal 3(,%eax,8)'
0 ; RUN: llvm-as < %s | llc -march=x86 | grep {orl \$1, %eax}
1 ; RUN: llvm-as < %s | llc -march=x86 | grep {leal 3(,%eax,8)'
22
33 ;; This example can't fold the or into an LEA.
44 define i32 @test(float ** %tmp2, i32 %tmp12) {
None ; RUN: llvm-as < %s | llc &&
1 ; RUN: llvm-as < %s | llc -march=x86 -mtriple=i686-darwin | grep 'addl $12, %esp'
0 ; RUN: llvm-as < %s | llc -march=x86 -mtriple=i686-darwin | \
1 ; RUN: grep {addl \$12, %esp}
22
33 define void @foo(i8** %buf, i32 %size, i32 %col, i8* %p) {
44 entry:
None ; RUN: llvm-as < %s | llc -march=x86 | grep 'mov %gs:72, %eax'
0 ; RUN: llvm-as < %s | llc -march=x86 | grep {mov %gs:72, %eax}
11 target datalayout = "e-p:32:32"
22 target triple = "i686-apple-darwin9"
33
None ; RUN: llvm-as < %s | llc -mcpu=yonah -march=x86 | grep 'cmpltsd %xmm0, %xmm0'
0 ; RUN: llvm-as < %s | llc -mcpu=yonah -march=x86 | \
1 ; RUN: grep {cmpltsd %xmm0, %xmm0}
12 target datalayout = "e-p:32:32"
23 target triple = "i686-apple-darwin9"
34
None ; RUN: llvm-as < %s | llc -march=x86 | grep 'psrlw $8, %xmm0'
0 ; RUN: llvm-as < %s | llc -march=x86 | grep {psrlw \$8, %xmm0}
11 target datalayout = "e-p:32:32"
22 target triple = "i686-apple-darwin9"
33
None ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -relocation-model=static | grep 'test1 $_GV' &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -relocation-model=static | grep 'test2 _GV'
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -relocation-model=static | \
1 ; RUN: grep {test1 \$_GV}
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -relocation-model=static | \
3 ; RUN: grep {test2 _GV}
24 ; PR882
35
46 target datalayout = "e-p:32:32"
11 ; insertion of register-register copies.
22
33 ; Make sure there are only 3 mov's for each testcase
4 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | grep 'mov ' | wc -l | grep 6
4 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | \
5 ; RUN: grep {mov } | wc -l | grep 6
56
67
78 target triple = "i686-pc-linux-gnu"
None load_lib llvm-dg.exp
0 load_lib llvm.exp
11
2 llvm-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]]
2 RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]]
0 ; Make sure this testcase codegens to the fabs instruction, not a call to fabsf
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=-sse2,-sse3 | grep 'fabs$' | wc -l | grep 1 &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=-sse2,-sse3 -enable-unsafe-fp-math | grep 'fabs$' | wc -l | grep 2
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=-sse2,-sse3 | \
2 ; RUN: grep fabs\$ | wc -l | grep 1
3 ; RUN: llvm-upgrade < %s | llvm-as | \
4 ; RUN: llc -march=x86 -mattr=-sse2,-sse3 -enable-unsafe-fp-math | \
5 ; RUN: grep fabs\$ | wc -l | grep 2
36
47 target endian = little
58 target pointersize = 32
None ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel -mcpu=yonah | grep 'ret 20'
0 ; RUN: llvm-upgrade < %s | llvm-as | \
1 ; RUN: llc -march=x86 -x86-asm-syntax=intel -mcpu=yonah | grep {ret 20}
12
23 ; Check that a fastcc function pops its stack variables before returning.
34
None ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | grep 'add ESP, 8'
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | \
1 ; RUN: grep {add ESP, 8}
12
23 target triple = "i686-pc-linux-gnu"
34
None ; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel | grep 'mov EDX, 1'
0 ; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel | \
1 ; RUN: grep {mov EDX, 1}
12 ; check that fastcc is passing stuff in regs.
23
34 declare x86_fastcallcc i64 @callee(i64)
None ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mtriple=mingw32 | grep '@12'
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mtriple=mingw32 | \
1 ; RUN: grep {@12}
12
23 ; Check that a fastcall function gets correct mangling
34
0 ;; Test that this FP immediate is stored in the constant pool as a float.
11
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=-sse2,-sse3 | grep '.long.1123418112'
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=-sse2,-sse3 | \
3 ; RUN: grep {.long.1123418112}
34
45 double %D() { ret double 123.0 }
None ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mcpu=i386 | grep fucomi.*st.[12]
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mcpu=i386 | \
1 ; RUN: grep {fucomi.*st.\[12\]}
12 ; PR1012
23
34 float %foo(float *%col.2.0) {
None ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | grep ST | not grep 'fadd\|fsub\|fdiv\|fmul'
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | \
1 ; RUN: grep ST | not grep {fadd\\|fsub\\|fdiv\\|fmul}
12
23 ; Test that the load of the constant is folded into the operation.
34
None ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | grep ST | not grep 'fadd\|fsub\|fdiv\|fmul'
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | \
1 ; RUN: grep ST | not grep {fadd\\|fsub\\|fdiv\\|fmul}
12
23 ; Test that the load of the memory location is folded into the operation.
34
None ; RUN: llvm-as < %s | llc -march=x86-64 | grep 'movq 8(%rdi), %rdx' &&
1 ; RUN: llvm-as < %s | llc -march=x86-64 | grep 'movq (%rdi), %rax'
0 ; RUN: llvm-as < %s | llc -march=x86-64 | grep {movq 8(%rdi), %rdx}
1 ; RUN: llvm-as < %s | llc -march=x86-64 | grep {movq (%rdi), %rax}
22
33 define i128 @test(i128 *%P) {
44 %A = load i128* %P
None ; RUN: llvm-as < %s | llc -march=x86 | not grep lea &&
1 ; RUN: llvm-as < %s | llc -march=x86 -mtriple=i686-apple-darwin8 | grep 'movl $4, (%ecx,%eax,4)'
0 ; RUN: llvm-as < %s | llc -march=x86 | not grep lea
1 ; RUN: llvm-as < %s | llc -march=x86 -mtriple=i686-apple-darwin8 | \
2 ; RUN: grep {movl \$4, (%ecx,%eax,4)}
23
34 define i32 @test(i32* %X, i32 %B) {
45 ; This gep should be sunk out of this block into the load/store users.
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep call
1 declare bool %llvm.isunordered(double)
1 declare bool %llvm.isunordered.f64(double)
22
33 bool %test_isnan(double %X) {
4 %R = call bool %llvm.isunordered(double %X, double %X)
4 %R = call bool %llvm.isunordered.f64(double %X, double %X)
55 ret bool %R
66 }
None ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | grep 'lea EAX, DWORD PTR \[... + 4\*... - 5\]' &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | not grep add
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | \
1 ; RUN: grep {lea EAX, DWORD PTR \\\[... + 4\\*... - 5\\\]}
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | \
3 ; RUN: not grep add
24
35 int %test1(int %A, int %B) {
46 %tmp1 = shl int %A, ubyte 2 ; [#uses=1]
0
1 ; RUN: llvm-as < %s | llc -march=x86-64 | grep 'leal (%rdi,%rdi,2), %eax' &&
1 ; RUN: llvm-as < %s | llc -march=x86-64 | grep {leal (%rdi,%rdi,2), %eax}
22 define i32 @test(i32 %a) {
33 %tmp2 = mul i32 %a, 3 ; [#uses=1]
44 ret i32 %tmp2
55 }
66
7 ; RUN: llvm-as < %s | llc -march=x86-64 | grep 'leaq (,%rdi,4), %rax'
7 ; RUN: llvm-as < %s | llc -march=x86-64 | grep {leaq (,%rdi,4), %rax}
88 define i64 @test2(i64 %a) {
99 %tmp2 = shl i64 %a, 2
1010 %tmp3 = or i64 %tmp2, %a
0 ; RUN: llvm-upgrade < %s | llvm-as | \
11 ; RUN: llc -relocation-model=dynamic-no-pic -mtriple=i686-apple-darwin8.7.2 |\
2 ; RUN: grep L_Arr.non_lazy_ptr &&
2 ; RUN: grep L_Arr.non_lazy_ptr
33 ; RUN: llvm-upgrade < %s | llvm-as | \
44 ; RUN: llc -relocation-model=dynamic-no-pic -mtriple=i686-apple-darwin8.7.2 |\
5 ; RUN: %prcontext L_Arr.non_lazy_ptr 1 | grep '4(%esp)'
5 ; RUN: %prcontext L_Arr.non_lazy_ptr 1 | grep {4(%esp)}
66
77 %Arr = external global [0 x int] ; <[0 x int]*> [#uses=2]
88
None ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep 'A(' | wc -l | grep 1
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | \
1 ; RUN: grep {A(} | wc -l | grep 1
12 ;
23 ; Make sure the common loop invariant _A(reg) is hoisted up to preheader.
34
55
66 ; Check that the shift gets turned into an LEA.
77
8 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | not grep 'mov E.X, E.X'
8 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | \
9 ; RUN: not grep {mov E.X, E.X}
910
1011 %G = external global int
1112
0 ;; Both functions in this testcase should codegen to the same function, and
11 ;; neither of them should require spilling anything to the stack.
22
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -stats 2>&1 | not grep 'Number of register spills'
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -stats |& \
4 ; RUN: not grep {Number of register spills}
45
56 ;; This can be compiled to use three registers if the loads are not
67 ;; folded into the multiplies, 2 registers otherwise.
None ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep div
21
32 int %test1(int %X) {
None ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | grep ro[rl] | wc -l | grep 12
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | \
1 ; RUN: grep {ro\[rl\]} | wc -l | grep 12
12
23 uint %rotl32(uint %A, ubyte %Amt) {
34 %B = shl uint %A, ubyte %Amt
None ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | grep 'shld.*CL' &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | not grep 'mov CL, BL'
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | \
1 ; RUN: grep {shld.*CL}
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | \
3 ; RUN: not grep {mov CL, BL}
24
35 ; PR687
46
None ; RUN: llvm-as < %s | llc -relocation-model=static -march=x86 | grep 'shll $3' | wc -l | grep 2
0 ; RUN: llvm-as < %s | llc -relocation-model=static -march=x86 | \
1 ; RUN: grep {shll \$3} | wc -l | grep 2
12
23 ; This should produce two shll instructions, not any lea's.
34
None ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | grep sh[lr]d | wc -l | grep 5
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | \
1 ; RUN: grep {sh\[lr\]d} | wc -l | grep 5
12
23 long %test1(long %X, ubyte %C) {
34 %Y = shl long %X, ubyte %C
None ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep 's[ah][rl]l' | wc -l | grep 1
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | \
1 ; RUN: grep {s\[ah\]\[rl\]l} | wc -l | grep 1
12
23 int* %test1(int *%P, uint %X) {
34 %Y = shr uint %X, ubyte 2
None ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 &&
1 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | not getp test
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | not grep test
21
32 define float @test1(float %a, float %b) {
43 %tmp = tail call float @copysignf( float %b, float %a )
None ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep 'mov'
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep mov
11 ;
22 ; Test the add and load are folded into the store instruction.
33
None ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | grep 'and DWORD PTR' | wc -l | grep 2
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -x86-asm-syntax=intel | \
1 ; RUN: grep {and DWORD PTR} | wc -l | grep 2
12
23 target endian = little
34 target pointersize = 32
None ; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic &&
1 ; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep _GLOBAL_OFFSET_TABLE_ &&
2 ; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep piclabel | wc -l | grep 3 &&
3 ; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep GOT | wc -l | grep 3 &&
4 ; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep GOTOFF | wc -l | grep 0
0 ; RUN: llvm-as < %s | \
1 ; RUN: llc -mtriple=i686-pc-linux-gnu -relocation-model=pic -o %t -f
2 ; RUN: grep _GLOBAL_OFFSET_TABLE_ %t
3 ; RUN: grep piclabel %t | wc -l | grep 3
4 ; RUN: grep GOT %t | wc -l | grep 3
5 ; RUN: not grep GOTOFF %t | wc -l
56
67 @ptr = external global i32*
78 @dst = external global i32
None ; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic &&
1 ; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep _GLOBAL_OFFSET_TABLE_ &&
2 ; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep piclabel | wc -l | grep 3 &&
3 ; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep PLT | wc -l | grep 1 &&
4 ; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep "GOT" | wc -l | grep 1 &&
5 ; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep "GOTOFF" | wc -l | grep 0
0 ; RUN: llvm-as < %s | \
1 ; RUN: llc -mtriple=i686-pc-linux-gnu -relocation-model=pic -o %t -f
2 ; RUN: grep _GLOBAL_OFFSET_TABLE_ %t
3 ; RUN: grep piclabel %t | wc -l | grep 3
4 ; RUN: grep PLT %t | wc -l | grep 1
5 ; RUN: grep "GOT" %t | wc -l | grep 1
6 ; RUN: not grep "GOTOFF" %t
67
78 @pfoo = external global void(...)*
89
None ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep 'subl.*60'
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep 'movdqa.*32'
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | \
1 ; RUN: grep {subl.*60}
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | \
3 ; RUN: grep {movdqa.*32}
24
35 void %test() {
46 tail call void %xx( int 1, int 2, int 3, int 4, int 5, int 6, int 7, <2 x long> cast (<4 x int> < int 4, int 3, int 2, int 1 > to <2 x long>), <2 x long> cast (<4 x int> < int 8, int 7, int 6, int 5 > to <2 x long>), <2 x long> cast (<4 x int> < int 6, int 4, int 2, int 0 > to <2 x long>), <2 x long> cast (<4 x int> < int 8, int 4, int 2, int 1 > to <2 x long>), <2 x long> cast (<4 x int> < int 0, int 1, int 3, int 9 > to <2 x long>) )
None ; RUN: llvm-as < %s | llc | grep 'movl %edi, %eax'
0 ; RUN: llvm-as < %s | llc | grep {movl %edi, %eax}
11 ; The input value is already sign extended, don't re-extend it.
22 ; This testcase corresponds to:
33 ; int test(short X) { return (int)X; }