llvm.org GIT mirror llvm / b7c0b24
Convert more tests to avoid llvm-as. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81545 91177308-0d34-0410-b5e6-96231b3b80d8 Dan Gohman 10 years ago
86 changed file(s) with 112 addition(s) and 181 deletion(s). Raw diff Collapse all Expand all
None ; RUN: llvm-as < %s | \
1 ; RUN: llc -mtriple=arm-linux-gnueabi -o %t
0 ; RUN: llc < %s -mtriple=arm-linux-gnueabi -o %t
21 ; RUN: grep set %t | count 5
32 ; RUN: grep globl %t | count 4
43 ; RUN: grep weak %t | count 1
None ; RUN: llvm-as < %s | \
1 ; RUN: llc -march=arm -mtriple=arm-apple-darwin
2 ; RUN: llvm-as < %s | \
3 ; RUN: llc -march=arm -mtriple=arm-apple-darwin | \
0 ; RUN: llc < %s -march=arm -mtriple=arm-apple-darwin | \
41 ; RUN: grep cmpne | count 1
5 ; RUN: llvm-as < %s | \
6 ; RUN: llc -march=arm -mtriple=arm-apple-darwin | \
2 ; RUN: llc < %s -march=arm -mtriple=arm-apple-darwin | \
73 ; RUN: grep ldmhi | count 1
84
95 define void @foo(i32 %X, i32 %Y) {
None ; RUN: llvm-as < %s | \
1 ; RUN: llc -march=arm -mtriple=arm-apple-darwin
2 ; RUN: llvm-as < %s | \
3 ; RUN: llc -march=arm -mtriple=arm-apple-darwin | \
0 ; RUN: llc < %s -march=arm -mtriple=arm-apple-darwin | \
41 ; RUN: grep cmpeq | count 1
5 ; RUN: llvm-as < %s | \
6 ; RUN: llc -march=arm -mtriple=arm-apple-darwin | \
2 ; RUN: llc < %s -march=arm -mtriple=arm-apple-darwin | \
73 ; RUN: grep moveq | count 1
8 ; RUN: llvm-as < %s | \
9 ; RUN: llc -march=arm -mtriple=arm-apple-darwin | \
4 ; RUN: llc < %s -march=arm -mtriple=arm-apple-darwin | \
105 ; RUN: grep ldmeq | count 1
116 ; FIXME: Need post-ifcvt branch folding to get rid of the extra br at end of BB1.
127
None ; RUN: llvm-as < %s | \
1 ; RUN: llc -march=arm -mtriple=arm-apple-darwin
2 ; RUN: llvm-as < %s | \
3 ; RUN: llc -march=arm -mtriple=arm-apple-darwin | \
0 ; RUN: llc < %s -march=arm -mtriple=arm-apple-darwin | \
41 ; RUN: grep ldmne | count 1
52
63 %struct.SString = type { i8*, i32, i32 }
None ; RUN: llvm-as < %s | \
1 ; RUN: llc -mtriple=arm-apple-darwin -relocation-model=static | \
0 ; RUN: llc < %s -mtriple=arm-apple-darwin -relocation-model=static | \
21 ; RUN: not grep {L_G\$non_lazy_ptr}
3 ; RUN: llvm-as < %s | \
4 ; RUN: llc -mtriple=arm-apple-darwin -relocation-model=dynamic-no-pic | \
2 ; RUN: llc < %s -mtriple=arm-apple-darwin -relocation-model=dynamic-no-pic | \
53 ; RUN: grep {L_G\$non_lazy_ptr} | count 2
6 ; RUN: llvm-as < %s | \
7 ; RUN: llc -mtriple=arm-apple-darwin -relocation-model=pic | \
4 ; RUN: llc < %s -mtriple=arm-apple-darwin -relocation-model=pic | \
85 ; RUN: grep {ldr.*pc} | count 1
9 ; RUN: llvm-as < %s | \
10 ; RUN: llc -mtriple=arm-linux-gnueabi -relocation-model=pic | \
6 ; RUN: llc < %s -mtriple=arm-linux-gnueabi -relocation-model=pic | \
117 ; RUN: grep {GOT} | count 1
128
139 @G = external global i32
None ; RUN: llvm-as -o - %s | llc -march=cellspu > %t1.s
0 ; RUN: llc < %s -march=cellspu > %t1.s
11 ; RUN: grep and %t1.s | count 234
22 ; RUN: grep andc %t1.s | count 85
33 ; RUN: grep andi %t1.s | count 37
None ; RUN: llvm-as -o - %s | llc -march=cellspu > %t1.s
0 ; RUN: llc < %s -march=cellspu > %t1.s
11 ; RUN: grep brsl %t1.s | count 1
22 ; RUN: grep brasl %t1.s | count 1
33 ; RUN: grep stqd %t1.s | count 80
None ; RUN: llvm-as -o - %s | llc -march=cellspu > %t1.s
1 ; RUN: llvm-as -o - %s | llc -march=cellspu -mattr=large_mem > %t2.s
0 ; RUN: llc < %s -march=cellspu > %t1.s
1 ; RUN: llc < %s -march=cellspu -mattr=large_mem > %t2.s
22 ; RUN: grep bisl %t1.s | count 7
33 ; RUN: grep ila %t1.s | count 1
44 ; RUN: grep rotqby %t1.s | count 6
None ; RUN: llvm-as -o - %s | llc -march=cellspu > %t1.s
0 ; RUN: llc < %s -march=cellspu > %t1.s
11 ; RUN: grep cntb %t1.s | count 3
22 ; RUN: grep andi %t1.s | count 3
33 ; RUN: grep rotmi %t1.s | count 2
None ; RUN: llvm-as -o - %s | llc -march=cellspu > %t1.s
0 ; RUN: llc < %s -march=cellspu > %t1.s
11 ; RUN: grep dfa %t1.s | count 2
22 ; RUN: grep dfs %t1.s | count 2
33 ; RUN: grep dfm %t1.s | count 6
None ; RUN: llvm-as -o - %s | llc -march=cellspu > %t1.s
0 ; RUN: llc < %s -march=cellspu > %t1.s
11 ; RUN: grep eqv %t1.s | count 18
22 ; RUN: grep xshw %t1.s | count 6
33 ; RUN: grep xsbh %t1.s | count 3
None ; RUN: llvm-as -o - %s | llc -march=cellspu > %t1.s
0 ; RUN: llc < %s -march=cellspu > %t1.s
11 ; RUN: grep shufb %t1.s | count 39
22 ; RUN: grep ilhu %t1.s | count 27
33 ; RUN: grep iohl %t1.s | count 27
None ; RUN: llvm-as -o - %s | llc -march=cellspu > %t1.s
0 ; RUN: llc < %s -march=cellspu > %t1.s
11 ; RUN: grep fceq %t1.s | count 1
22 ; RUN: grep fcmeq %t1.s | count 1
33
None ; RUN: llvm-as -o - %s | llc -march=cellspu > %t1.s
0 ; RUN: llc < %s -march=cellspu > %t1.s
11
22 define i1 @fcmp_eq_setcc_f64(double %arg1, double %arg2) nounwind {
33 entry:
None ; RUN: llvm-as -o - %s | llc -march=cellspu > %t1.s
0 ; RUN: llc < %s -march=cellspu > %t1.s
11 ; RUN: grep frest %t1.s | count 2
22 ; RUN: grep -w fi %t1.s | count 2
33 ; RUN: grep -w fm %t1.s | count 2
None ; RUN: llvm-as -o - %s | llc -march=cellspu > %t1.s
0 ; RUN: llc < %s -march=cellspu > %t1.s
11 ; RUN: grep 32768 %t1.s | count 2
22 ; RUN: grep xor %t1.s | count 4
33 ; RUN: grep and %t1.s | count 2
None ; RUN: llvm-as -o - %s | llc -march=cellspu > %t1.s
0 ; RUN: llc < %s -march=cellspu > %t1.s
11 ; RUN: grep xswd %t1.s | count 3
22 ; RUN: grep xsbh %t1.s | count 1
33 ; RUN: grep xshw %t1.s | count 2
None ; RUN: llvm-as -o - %s | llc -march=cellspu > %t1.s
0 ; RUN: llc < %s -march=cellspu > %t1.s
11
22 ; ModuleID = 'i8ops.bc'
33 target datalayout = "E-p:32:32:128-f64:64:128-f32:32:128-i64:32:128-i32:32:128-i16:16:128-i8:8:128-i1:8:128-a0:0:128-v128:128:128-s0:128:128"
None ; RUN: llvm-as -o - %s | llc -march=cellspu > %t1.s
0 ; RUN: llc < %s -march=cellspu > %t1.s
11 ; RUN: grep ilh %t1.s | count 15
22 ; RUN: grep ceqh %t1.s | count 29
33 ; RUN: grep ceqhi %t1.s | count 13
None ; RUN: llvm-as -o - %s | llc -march=cellspu > %t1.s
0 ; RUN: llc < %s -march=cellspu > %t1.s
11 ; RUN: grep ila %t1.s | count 6
22 ; RUN: grep ceq %t1.s | count 28
33 ; RUN: grep ceqi %t1.s | count 12
None ; RUN: llvm-as -o - %s | llc -march=cellspu > %t1.s
0 ; RUN: llc < %s -march=cellspu > %t1.s
11 ; RUN: grep ceq %t1.s | count 20
22 ; RUN: grep cgti %t1.s | count 12
33 ; RUN: grep cgt %t1.s | count 16
None ; RUN: llvm-as -o - %s | llc -march=cellspu > %t1.s
0 ; RUN: llc < %s -march=cellspu > %t1.s
11 ; RUN: grep ceqb %t1.s | count 24
22 ; RUN: grep ceqbi %t1.s | count 12
33 ; RUN: grep clgtb %t1.s | count 11
None ; RUN: llvm-as -o - %s | llc -march=cellspu > %t1.s
0 ; RUN: llc < %s -march=cellspu > %t1.s
11 ; RUN: grep "ilh" %t1.s | count 11
22 target datalayout = "E-p:32:32:128-f64:64:128-f32:32:128-i64:32:128-i32:32:128-i16:16:128-i8:8:128-i1:8:128-a0:0:128-v128:128:128-s0:128:128"
33 target triple = "spu"
None ; RUN: llvm-as -o - %s | llc -march=cellspu > %t1.s
0 ; RUN: llc < %s -march=cellspu > %t1.s
11 ; RUN: grep ilhu %t1.s | count 8
22 ; RUN: grep iohl %t1.s | count 6
33 ; RUN: grep -w il %t1.s | count 3
None ; RUN: llvm-as -o - %s | llc -march=cellspu > %t1.s
0 ; RUN: llc < %s -march=cellspu > %t1.s
11 ; RUN: grep lqa %t1.s | count 13
22 ; RUN: grep ilhu %t1.s | count 15
33 ; RUN: grep ila %t1.s | count 1
None ; RUN: llvm-as -o - %s | llc -march=cellspu > %t1.s
0 ; RUN: llc < %s -march=cellspu > %t1.s
11 ; RUN: grep csflt %t1.s | count 5
22 ; RUN: grep cuflt %t1.s | count 1
33 ; RUN: grep xshw %t1.s | count 2
None ; RUN: llvm-as -o - %s | llc -march=cellspu > %t1.s
0 ; RUN: llc < %s -march=cellspu > %t1.s
11 ; RUN: grep ceq %t1.s | count 30
22 ; RUN: grep ceqb %t1.s | count 10
33 ; RUN: grep ceqhi %t1.s | count 5
None ; RUN: llvm-as -o - %s | llc -march=cellspu > %t1.s
0 ; RUN: llc < %s -march=cellspu > %t1.s
11 ; RUN: grep fa %t1.s | count 5
22 ; RUN: grep fs %t1.s | count 5
33 ; RUN: grep fm %t1.s | count 15
None ; RUN: llvm-as -o - %s | llc -march=cellspu > %t1.s
0 ; RUN: llc < %s -march=cellspu > %t1.s
11 ; RUN: grep and %t1.s | count 20
22 ; RUN: grep andc %t1.s | count 5
33 target datalayout = "E-p:32:32:128-f64:64:128-f32:32:128-i64:32:128-i32:32:128-i16:16:128-i8:8:128-i1:8:128-a0:0:128-v128:128:128-s0:128:128"
None ; RUN: llvm-as -o - %s | llc -march=cellspu | FileCheck %s
0 ; RUN: llc < %s -march=cellspu | FileCheck %s
11
22 ; ModuleID = 'loads.bc'
33 target datalayout = "E-p:32:32:128-f64:64:128-f32:32:128-i64:32:128-i32:32:128-i16:16:128-i8:8:128-i1:8:128-a0:0:128-v128:128:128-s0:128:128"
None ; RUN: llvm-as -o - %s | llc -march=cellspu > %t1.s
0 ; RUN: llc < %s -march=cellspu > %t1.s
11 ; RUN: grep mpy %t1.s | count 44
22 ; RUN: grep mpyu %t1.s | count 4
33 ; RUN: grep mpyh %t1.s | count 10
None ; RUN: llvm-as -o - %s | llc -march=cellspu > %t1.s
0 ; RUN: llc < %s -march=cellspu > %t1.s
11 ; RUN: grep nand %t1.s | count 90
22 ; RUN: grep and %t1.s | count 94
33 ; RUN: grep xsbh %t1.s | count 2
None ; RUN: llvm-as -o - %s | llc -march=cellspu > %t1.s
0 ; RUN: llc < %s -march=cellspu > %t1.s
11 ; RUN: grep and %t1.s | count 2
22 ; RUN: grep orc %t1.s | count 85
33 ; RUN: grep ori %t1.s | count 30
None ; RUN: llvm-as -o - %s | llc -march=cellspu -o %t1.s
0 ; RUN: llc < %s -march=cellspu -o %t1.s
11 ; RUN: grep rot %t1.s | count 85
22 ; RUN: grep roth %t1.s | count 8
33 ; RUN: grep roti.*5 %t1.s | count 1
None ; RUN: llvm-as -o - %s | llc -march=cellspu > %t1.s
0 ; RUN: llc < %s -march=cellspu > %t1.s
11 ; RUN: grep selb %t1.s | count 56
22
33 target datalayout = "E-p:32:32:128-f64:64:128-f32:32:128-i64:32:128-i32:32:128-i16:16:128-i8:8:128-i1:8:128-a0:0:128-v128:128:128-s0:128:128"
None ; RUN: llvm-as -o - %s | llc -march=cellspu | FileCheck %s
0 ; RUN: llc < %s -march=cellspu | FileCheck %s
11
22 ; ModuleID = 'sext128.bc'
33 target datalayout = "E-p:32:32:128-i1:8:128-i8:8:128-i16:16:128-i32:32:128-i64:32:128-f32:32:128-f64:64:128-v64:128:128-v128:128:128-a0:0:128-s0:128:128"
None ; RUN: llvm-as -o - %s | llc -march=cellspu > %t1.s
0 ; RUN: llc < %s -march=cellspu > %t1.s
11 ; RUN: grep {shlh } %t1.s | count 9
22 ; RUN: grep {shlhi } %t1.s | count 3
33 ; RUN: grep {shl } %t1.s | count 9
None ; RUN: llvm-as -o - %s | llc -march=cellspu -enable-unsafe-fp-math > %t1.s
0 ; RUN: llc < %s -march=cellspu -enable-unsafe-fp-math > %t1.s
11 ; RUN: grep fa %t1.s | count 2
22 ; RUN: grep fs %t1.s | count 2
33 ; RUN: grep fm %t1.s | count 6
None ; RUN: llvm-as -o - %s | llc -march=cellspu > %t1.s
0 ; RUN: llc < %s -march=cellspu > %t1.s
11 ; RUN: grep {stqd.*0(\$3)} %t1.s | count 4
22 ; RUN: grep {stqd.*16(\$3)} %t1.s | count 4
33 ; RUN: grep 16256 %t1.s | count 2
None ; RUN: llvm-as -o - %s | llc -march=cellspu > %t1.s
1 ; RUN: llvm-as -o - %s | llc -march=cellspu -mattr=large_mem > %t2.s
0 ; RUN: llc < %s -march=cellspu > %t1.s
1 ; RUN: llc < %s -march=cellspu -mattr=large_mem > %t2.s
22 ; RUN: grep lqa %t1.s | count 5
33 ; RUN: grep lqd %t1.s | count 11
44 ; RUN: grep rotqbyi %t1.s | count 7
None ; RUN: llvm-as -o - %s | llc -march=cellspu > %t1.s
0 ; RUN: llc < %s -march=cellspu > %t1.s
11 ; RUN: grep shufb %t1.s | count 19
22 ; RUN: grep {ilhu.*1799} %t1.s | count 1
33 ; RUN: grep {ilhu.*771} %t1.s | count 2
None ; RUN: llvm-as -o - %s | llc -march=cellspu > %t1.s
1 ; RUN: llvm-as -o - %s | llc -march=cellspu -mattr=large_mem > %t2.s
0 ; RUN: llc < %s -march=cellspu > %t1.s
1 ; RUN: llc < %s -march=cellspu -mattr=large_mem > %t2.s
22 ; RUN: grep -w il %t1.s | count 3
33 ; RUN: grep ilhu %t1.s | count 8
44 ; RUN: grep -w ilh %t1.s | count 5
None ; RUN: llvm-as -o - %s | llc -march=cellspu > %t1.s
0 ; RUN: llc < %s -march=cellspu > %t1.s
11 ; RUN: grep cbd %t1.s | count 5
22 ; RUN: grep chd %t1.s | count 5
33 ; RUN: grep cwd %t1.s | count 10
None ; RUN: llvm-as %s -o - | llc
0 ; RUN: llc < %s
11
22 ; This caused the backend to assert out with:
33 ; SparcInstrInfo.cpp:103: failed assertion `0 && "Unexpected unsigned type"'
None ; RUN: llvm-as %s -o - | llc
0 ; RUN: llc < %s
11
22 ; July 6, 2002 -- LLC Regression test
33 ; This test case checks if the integer CC register %xcc (or %ccr)
None ; RUN: llvm-as < %s | \
1 ; RUN: llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -mcpu=g5 | \
0 ; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin8 -mcpu=g5 | \
21 ; RUN: grep {vspltish v.*, 10}
32
43 define void @test(<8 x i16>* %P) {
None ; RUN: llvm-as < %s | \
1 ; RUN: llc -march=ppc32 -combiner-alias-analysis | grep f5
0 ; RUN: llc < %s -march=ppc32 -combiner-alias-analysis | grep f5
21
32 target datalayout = "E-p:32:32"
43 target triple = "powerpc-apple-darwin8.2.0"
None ; RUN: llvm-as < %s | \
1 ; RUN: llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -o %t1
0 ; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin8 -o %t1
21 ; RUN not grep {stw r31, 20(r1)} %t1
32 ; RUN: grep {stwu r1, -16448(r1)} %t1
43 ; RUN: grep {addi r1, r1, 16448} %t1
5 ; RUN: llvm-as < %s | \
4 ; RUN: llc < %s -march=ppc32 | \
65 ; RUN: not grep {lwz r31, 20(r1)}
7 ; RUN: llvm-as < %s | \
8 ; RUN: llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -disable-fp-elim \
6 ; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin8 -disable-fp-elim \
97 ; RUN: -o %t2
108 ; RUN: grep {stw r31, 20(r1)} %t2
119 ; RUN: grep {stwu r1, -16448(r1)} %t2
1210 ; RUN: grep {addi r1, r1, 16448} %t2
1311 ; RUN: grep {lwz r31, 20(r1)} %t2
14 ; RUN: llvm-as < %s | \
15 ; RUN: llc -march=ppc64 -mtriple=powerpc-apple-darwin8 -o %t3
12 ; RUN: llc < %s -march=ppc64 -mtriple=powerpc-apple-darwin8 -o %t3
1613 ; RUN: not grep {std r31, 40(r1)} %t3
1714 ; RUN: grep {stdu r1, -16496(r1)} %t3
1815 ; RUN: grep {addi r1, r1, 16496} %t3
1916 ; RUN: not grep {ld r31, 40(r1)} %t3
20 ; RUN: llvm-as < %s | \
21 ; RUN: llc -march=ppc64 -mtriple=powerpc-apple-darwin8 -disable-fp-elim \
17 ; RUN: llc < %s -march=ppc64 -mtriple=powerpc-apple-darwin8 -disable-fp-elim \
2218 ; RUN: -o %t4
2319 ; RUN: grep {std r31, 40(r1)} %t4
2420 ; RUN: grep {stdu r1, -16496(r1)} %t4
0 ; There should be exactly one vxor here.
1 ; RUN: llvm-as < %s | \
2 ; RUN: llc -march=ppc32 -mcpu=g5 --enable-unsafe-fp-math | \
1 ; RUN: llc < %s -march=ppc32 -mcpu=g5 --enable-unsafe-fp-math | \
32 ; RUN: grep vxor | count 1
43
54 ; There should be exactly one vsplti here.
6 ; RUN: llvm-as < %s | \
7 ; RUN: llc -march=ppc32 -mcpu=g5 --enable-unsafe-fp-math | \
5 ; RUN: llc < %s -march=ppc32 -mcpu=g5 --enable-unsafe-fp-math | \
86 ; RUN: grep vsplti | count 1
97
108 define void @VXOR(<4 x float>* %P1, <4 x i32>* %P2, <4 x float>* %P3) {
0 ; fsqrt should be generated when the fsqrt feature is enabled, but not
11 ; otherwise.
22
3 ; RUN: llvm-as < %s | \
4 ; RUN: llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -mattr=+fsqrt | \
3 ; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin8 -mattr=+fsqrt | \
54 ; RUN: grep {fsqrt f1, f1}
6 ; RUN: llvm-as < %s | \
7 ; RUN: llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -mcpu=g5 | \
8 ; RUN: grep {fsqrt f1, f1}
9 ; RUN: llvm-as < %s | \
10 ; RUN: llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -mattr=-fsqrt | \
5 ; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin8 -mcpu=g5 | \
6 ; RUN: grep {fsqrt f1, f1}
7 ; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin8 -mattr=-fsqrt | \
118 ; RUN: not grep {fsqrt f1, f1}
12 ; RUN: llvm-as < %s | \
13 ; RUN: llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -mcpu=g4 | \
9 ; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin8 -mcpu=g4 | \
1410 ; RUN: not grep {fsqrt f1, f1}
1511
1612 declare double @llvm.sqrt.f64(double)
None ; RUN: llvm-as < %s | \
1 ; RUN: llc -march=ppc32 -mtriple=powerpc-apple-darwin8 | \
0 ; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin8 | \
21 ; RUN: grep {srwi r., r., 5}
32
43 define i32 @eq0(i32 %a) {
None ; RUN: llvm-as < %s | \
1 ; RUN: llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -mattr=stfiwx -o %t1
0 ; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin8 -mattr=stfiwx -o %t1
21 ; RUN: grep stfiwx %t1
32 ; RUN: not grep r1 %t1
4 ; RUN: llvm-as < %s | \
5 ; RUN: llc -march=ppc32 -mtriple=powerpc-apple-darwin8 -mattr=-stfiwx \
3 ; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin8 -mattr=-stfiwx \
64 ; RUN: -o %t2
75 ; RUN: not grep stfiwx %t2
86 ; RUN: grep r1 %t2
None ; RUN: llvm-as < %s | \
1 ; RUN: llc -march=sparc -mattr=v9 -enable-sparc-v9-insts
0 ; RUN: llc < %s -march=sparc -mattr=v9 -enable-sparc-v9-insts
21 ; RUN: llc < %s -march=sparc -mattr=-v9 | \
32 ; RUN: not grep popc
4 ; RUN: llvm-as < %s | \
5 ; RUN: llc -march=sparc -mattr=v9 -enable-sparc-v9-insts | grep popc
3 ; RUN: llc < %s -march=sparc -mattr=v9 -enable-sparc-v9-insts | grep popc
64
75 declare i32 @llvm.ctpop.i32(i32)
86
None ; RUN: llvm-as < %s | \
1 ; RUN: llc -mtriple=thumbv7-apple-darwin -relocation-model=static | FileCheck %s -check-prefix=STATIC
2 ; RUN: llvm-as < %s | \
3 ; RUN: llc -mtriple=thumbv7-apple-darwin -relocation-model=dynamic-no-pic | FileCheck %s -check-prefix=DYNAMIC
4 ; RUN: llvm-as < %s | \
5 ; RUN: llc -mtriple=thumbv7-apple-darwin -relocation-model=pic | FileCheck %s -check-prefix=PIC
6 ; RUN: llvm-as < %s | \
7 ; RUN: llc -mtriple=thumbv7-linux-gnueabi -relocation-model=pic | FileCheck %s -check-prefix=LINUX
0 ; RUN: llc < %s -mtriple=thumbv7-apple-darwin -relocation-model=static | FileCheck %s -check-prefix=STATIC
1 ; RUN: llc < %s -mtriple=thumbv7-apple-darwin -relocation-model=dynamic-no-pic | FileCheck %s -check-prefix=DYNAMIC
2 ; RUN: llc < %s -mtriple=thumbv7-apple-darwin -relocation-model=pic | FileCheck %s -check-prefix=PIC
3 ; RUN: llc < %s -mtriple=thumbv7-linux-gnueabi -relocation-model=pic | FileCheck %s -check-prefix=LINUX
84
95 @G = external global i32
106
None ; RUN: llvm-as < %s | \
1 ; RUN: llc -march=x86 -mtriple=i686-apple-darwin8 -relocation-model=static > %t
0 ; RUN: llc < %s -march=x86 -mtriple=i686-apple-darwin8 -relocation-model=static > %t
21 ; RUN: grep {movl _last} %t | count 1
32 ; RUN: grep {cmpl.*_last} %t | count 1
43
None ; RUN: llvm-as < %s | \
1 ; RUN: llc -march=x86 -relocation-model=static -stats |& \
0 ; RUN: llc < %s -march=x86 -relocation-model=static -stats |& \
21 ; RUN: grep asm-printer | grep 14
32 ;
43 @size20 = external global i32 ; [#uses=1]
None ; RUN: llvm-as < %s | \
1 ; RUN: llc -march=x86 -relocation-model=static | not grep {subl.*%esp}
0 ; RUN: llc < %s -march=x86 -relocation-model=static | not grep {subl.*%esp}
21
32 @A = external global i16* ; [#uses=1]
43 @B = external global i32 ; [#uses=1]
None ; RUN: llvm-as < %s | \
1 ; RUN: llc -mtriple=i686-pc-linux-gnu -asm-verbose=false -o %t
0 ; RUN: llc < %s -mtriple=i686-pc-linux-gnu -asm-verbose=false -o %t
21 ; RUN: grep set %t | count 7
32 ; RUN: grep globl %t | count 6
43 ; RUN: grep weak %t | count 1
None ; RUN: llvm-as %s -o - | llc -march=x86-64 -mattr=+sse2
0 ; RUN: llc < %s -march=x86-64 -mattr=+sse2
11
22 define void @test(float* %R, <4 x float> %X) nounwind {
33 %tmp = extractelement <4 x float> %X, i32 3
None ; RUN: llvm-as %s -o - | llc -march=x86 -mattr=+sse2 -mcpu=yonah | not grep movd
1 ; RUN: llvm-as %s -o - | llc -march=x86-64 -mattr=+sse2 -mcpu=core2 | not grep movd
0 ; RUN: llc < %s -march=x86 -mattr=+sse2 -mcpu=yonah | not grep movd
1 ; RUN: llc < %s -march=x86-64 -mattr=+sse2 -mcpu=core2 | not grep movd
22
33 define i32 @t(<2 x i64>* %val) nounwind {
44 %tmp2 = load <2 x i64>* %val, align 16 ; <<2 x i64>> [#uses=1]
0 ; Make sure this testcase codegens to the fabs instruction, not a call to fabsf
11 ; RUN: llc < %s -march=x86 -mattr=-sse2,-sse3,-sse | grep fabs\$ | \
22 ; RUN: count 2
3 ; RUN: llvm-as < %s | \
4 ; RUN: llc -march=x86 -mattr=-sse,-sse2,-sse3 -enable-unsafe-fp-math | \
3 ; RUN: llc < %s -march=x86 -mattr=-sse,-sse2,-sse3 -enable-unsafe-fp-math | \
54 ; RUN: grep fabs\$ | count 3
65
76 declare float @fabsf(float)
None ; RUN: llvm-as < %s | \
1 ; RUN: llc -march=x86 -x86-asm-syntax=intel -mcpu=yonah | grep {ret 20}
0 ; RUN: llc < %s -march=x86 -x86-asm-syntax=intel -mcpu=yonah | grep {ret 20}
21
32 ; Check that a fastcc function pops its stack variables before returning.
43
None ; RUN: llvm-as < %s | \
1 ; RUN: llc -mtriple=i686-apple-darwin8 -mcpu=yonah -march=x86 > %t
0 ; RUN: llc < %s -mtriple=i686-apple-darwin8 -mcpu=yonah -march=x86 > %t
21 ; RUN: grep fldl %t | count 1
32 ; RUN: not grep xmm %t
43 ; RUN: grep {sub.*esp} %t | count 1
None ; RUN: llvm-as %s -o - | llc -march=x86-64
0 ; RUN: llc < %s -march=x86-64
11
22 define <4 x double> @foo0(<4 x double> %t) {
33 %r = insertelement <4 x double> %t, double 2.3, i32 0
0 ; Make sure this testcase codegens to the sin and cos instructions, not calls
1 ; RUN: llvm-as < %s | \
2 ; RUN: llc -march=x86 -mattr=-sse,-sse2,-sse3 -enable-unsafe-fp-math | \
1 ; RUN: llc < %s -march=x86 -mattr=-sse,-sse2,-sse3 -enable-unsafe-fp-math | \
32 ; RUN: grep sin\$ | count 3
4 ; RUN: llvm-as < %s | \
5 ; RUN: llc -march=x86 -mattr=-sse,-sse2,-sse3 -enable-unsafe-fp-math | \
3 ; RUN: llc < %s -march=x86 -mattr=-sse,-sse2,-sse3 -enable-unsafe-fp-math | \
64 ; RUN: grep cos\$ | count 3
75
86 declare float @sinf(float)
None ; RUN: llvm-as < %s | \
1 ; RUN: llc -march=x86 -mcpu=yonah | not grep movss
2 ; RUN: llvm-as < %s | \
3 ; RUN: llc -march=x86 -mcpu=yonah | not grep xmm
0 ; RUN: llc < %s -march=x86 -mcpu=yonah | not grep movss
1 ; RUN: llc < %s -march=x86 -mcpu=yonah | not grep xmm
42
53 define double @test1(double* %P) {
64 %X = load double* %P ; [#uses=1]
None ; RUN: llvm-as < %s | \
1 ; RUN: llc -march=x86-64 -mattr=+64bit,+sse3 -print-failed-fuse-candidates |& \
0 ; RUN: llc < %s -march=x86-64 -mattr=+64bit,+sse3 -print-failed-fuse-candidates |& \
21 ; RUN: grep fail | count 1
32
43 declare float @test_f(float %f)
22 ; RUN: grep %%rip %t1 | count 6
33 ; RUN: grep movq %t1 | count 6
44 ; RUN: grep leaq %t1 | count 1
5 ; RUN: llvm-as < %s | \
6 ; RUN: llc -mtriple=x86_64-pc-linux -relocation-model=static -o %t2
5 ; RUN: llc < %s -mtriple=x86_64-pc-linux -relocation-model=static -o %t2
76 ; RUN: grep movl %t2 | count 2
87 ; RUN: grep movq %t2 | count 2
98
None ; RUN: llvm-as < %s | \
1 ; RUN: llc -mtriple=x86_64-pc-linux -relocation-model=pic -o %t1
0 ; RUN: llc < %s -mtriple=x86_64-pc-linux -relocation-model=pic -o %t1
21 ; RUN: grep {call f@PLT} %t1
32
43 define void @g() {
None ; RUN: llvm-as < %s | \
1 ; RUN: llc -mtriple=x86_64-pc-linux -relocation-model=pic -o %t1
0 ; RUN: llc < %s -mtriple=x86_64-pc-linux -relocation-model=pic -o %t1
21 ; RUN: grep {call g@PLT} %t1
32
43 @g = alias weak i32 ()* @f
None ; RUN: llvm-as < %s | \
1 ; RUN: llc -mtriple=x86_64-pc-linux -relocation-model=pic -o %t1
0 ; RUN: llc < %s -mtriple=x86_64-pc-linux -relocation-model=pic -o %t1
21 ; RUN: grep {call __fixunsxfti@PLT} %t1
32
43 define i128 @f(x86_fp80 %a) nounwind {
None ; RUN: llvm-as < %s | \
1 ; RUN: llc -mtriple=x86_64-pc-linux -relocation-model=pic -o %t1
0 ; RUN: llc < %s -mtriple=x86_64-pc-linux -relocation-model=pic -o %t1
21 ; RUN: grep {call f} %t1
32 ; RUN: not grep {call f@PLT} %t1
43
None ; RUN: llvm-as < %s | \
1 ; RUN: llc -mtriple=x86_64-pc-linux -relocation-model=pic -o %t1
0 ; RUN: llc < %s -mtriple=x86_64-pc-linux -relocation-model=pic -o %t1
21 ; RUN: grep {call f} %t1
32 ; RUN: not grep {call f@PLT} %t1
43
None ; RUN: llvm-as < %s | \
1 ; RUN: llc -mtriple=x86_64-pc-linux -relocation-model=pic -o %t1
0 ; RUN: llc < %s -mtriple=x86_64-pc-linux -relocation-model=pic -o %t1
21 ; RUN: grep {movq a@GOTPCREL(%rip),} %t1
32
43 @a = global i32 0
None ; RUN: llvm-as < %s | \
1 ; RUN: llc -mtriple=x86_64-pc-linux -relocation-model=pic -o %t1
0 ; RUN: llc < %s -mtriple=x86_64-pc-linux -relocation-model=pic -o %t1
21 ; RUN: grep {movl a(%rip),} %t1
32 ; RUN: not grep GOTPCREL %t1
43
None ; RUN: llvm-as < %s | \
1 ; RUN: llc -mtriple=x86_64-pc-linux -relocation-model=pic -o %t1
0 ; RUN: llc < %s -mtriple=x86_64-pc-linux -relocation-model=pic -o %t1
21 ; RUN: grep {movl a(%rip),} %t1
32 ; RUN: not grep GOTPCREL %t1
43
None ; RUN: llvm-as < %s | \
1 ; RUN: llc -mtriple=x86_64-pc-linux -relocation-model=pic -o %t1
0 ; RUN: llc < %s -mtriple=x86_64-pc-linux -relocation-model=pic -o %t1
21 ; RUN: grep {movq f@GOTPCREL(%rip),} %t1
32
43 define void ()* @g() nounwind {
None ; RUN: llvm-as < %s | \
1 ; RUN: llc -mtriple=x86_64-pc-linux -relocation-model=pic -o %t1
0 ; RUN: llc < %s -mtriple=x86_64-pc-linux -relocation-model=pic -o %t1
21 ; RUN: grep {leaq f(%rip),} %t1
32 ; RUN: not grep GOTPCREL %t1
43
None ; RUN: llvm-as < %s | \
1 ; RUN: llc -mtriple=x86_64-pc-linux -relocation-model=pic -o %t1
0 ; RUN: llc < %s -mtriple=x86_64-pc-linux -relocation-model=pic -o %t1
21 ; RUN: grep {leaq f(%rip),} %t1
32 ; RUN: not grep GOTPCREL %t1
43
None ; RUN: llvm-as < %s | \
1 ; RUN: opt -predsimplify -instcombine -simplifycfg -S > %t
0 ; RUN: opt < %s -predsimplify -instcombine -simplifycfg -S > %t
21 ; RUN: grep -v declare %t | not grep fail
32 ; RUN: grep -v declare %t | grep pass | count 3
43
None ; RUN: llvm-as < %s | \
1 ; RUN: opt -predsimplify -instcombine -simplifycfg -S | \
0 ; RUN: opt < %s -predsimplify -instcombine -simplifycfg -S | \
21 ; RUN: grep -v declare | grep pass | count 2
32
43 define i32 @test(i32 %x, i32 %y) {
None ; RUN: llvm-as < %s | \
1 ; RUN: opt -predsimplify -instcombine -simplifycfg -S > %t
0 ; RUN: opt < %s -predsimplify -instcombine -simplifycfg -S > %t
21 ; RUN: grep -v declare %t | not grep fail
32 ; RUN: grep -v declare %t | grep pass | count 4
43
0 ; This should be one add and two multiplies.
11
2 ; RUN: llvm-as < %s | \
3 ; RUN: opt -reassociate -instcombine -S > %t
2 ; RUN: opt < %s -reassociate -instcombine -S > %t
43 ; RUN: grep mul %t | count 2
54 ; RUN: grep add %t | count 1
65
0 ; This should turn into one multiply and one add.
11
2 ; RUN: llvm-as < %s | \
3 ; RUN: opt -instcombine -reassociate -instcombine -S > %t
2 ; RUN: opt < %s -instcombine -reassociate -instcombine -S > %t
43 ; RUN: grep mul %t | count 1
54 ; RUN: grep add %t | count 1
65
0 ; There should be exactly one shift and one add left.
1 ; RUN: llvm-as < %s | \
2 ; RUN: opt -reassociate -instcombine -S > %t
1 ; RUN: opt < %s -reassociate -instcombine -S > %t
32 ; RUN: grep shl %t | count 1
43 ; RUN: grep add %t | count 1
54
0 ; This function contains two tail calls, which should be eliminated
1 ; RUN: llvm-as < %s | \
2 ; RUN: opt -tailcallelim -stats -disable-output |& grep {2 tailcallelim}
1 ; RUN: opt < %s -tailcallelim -stats -disable-output |& grep {2 tailcallelim}
32
43 define i32 @Ack(i32 %M.1, i32 %N.1) {
54 entry: