llvm.org GIT mirror llvm / 43c3db3
Convert tests using "grep -c ... | grep ..." to use the count script. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41100 91177308-0d34-0410-b5e6-96231b3b80d8 Dan Gohman 12 years ago
10 changed file(s) with 15 addition(s) and 15 deletion(s). Raw diff Collapse all Expand all
0 // RUN: %llvmgxx -c -emit-llvm %s -o - | llvm-dis | grep llvm.global.annotations
1 // RUN: %llvmgxx -c -emit-llvm %s -o - | llvm-dis | grep -c llvm.var.annotation | grep 3
1 // RUN: %llvmgxx -c -emit-llvm %s -o - | llvm-dis | grep llvm.var.annotation | count 3
22
33 #include
44
None // RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | grep -c {align 1} | grep 2
0 // RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | grep {align 1} | count 2
11 // RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | llvm-as | llc
22
33 struct p {
0 ; RUN: llvm-as < %s | \
11 ; RUN: llc -mtriple=arm-linux-gnueabi -o %t -f
2 ; RUN: grep -c set %t | grep 5
3 ; RUN: grep -c globl %t | grep 4
4 ; RUN: grep -c weak %t | grep 1
2 ; RUN: grep set %t | count 5
3 ; RUN: grep globl %t | count 4
4 ; RUN: grep weak %t | count 1
55
66 @bar = external global i32
77 @foo1 = alias i32* @bar
0 ; RUN: llvm-as < %s | \
11 ; RUN: llc -march=arm -o %t -f
2 ; RUN: grep -c ldrb %t | grep 4
3 ; RUN: grep -c strb %t | grep 4
2 ; RUN: grep ldrb %t | count 4
3 ; RUN: grep strb %t | count 4
44
55
66 %struct.p = type <{ i8, i32 }>
None ; RUN: llvm-as < %s | llc -march=x86 | grep -c je | grep 3
0 ; RUN: llvm-as < %s | llc -march=x86 | grep je | count 3
11 ; RUN: llvm-as < %s | llc -march=x86-64 | grep 4297064449
22 ; PR 1325+
33
0 ; RUN: llvm-as < %s | \
11 ; RUN: llc -mtriple=i686-pc-linux-gnu -o %t -f
2 ; RUN: grep -c set %t | grep 5
3 ; RUN: grep -c globl %t | grep 4
4 ; RUN: grep -c weak %t | grep 1
2 ; RUN: grep set %t | count 5
3 ; RUN: grep globl %t | count 4
4 ; RUN: grep weak %t | count 1
55
66 @bar = external global i32
77 @foo1 = alias i32* @bar
0 ; RUN: llvm-upgrade < %s | llvm-as | \
11 ; RUN: opt -predsimplify -instcombine -simplifycfg | llvm-dis > %t
22 ; RUN: grep -v declare %t | not grep fail
3 ; RUN: grep -v declare %t | grep -c pass | grep 3
3 ; RUN: grep -v declare %t | grep pass | count 3
44
55 int %test1(int %x, int %y) {
66 entry:
0 ; RUN: llvm-upgrade < %s | llvm-as | \
11 ; RUN: opt -predsimplify -instcombine -simplifycfg | llvm-dis | \
2 ; RUN: grep -v declare | grep -c pass | grep 2
2 ; RUN: grep -v declare | grep pass | count 2
33
44 int %test(int %x, int %y) {
55 entry:
0 ; RUN: llvm-upgrade < %s | llvm-as | \
11 ; RUN: opt -predsimplify -instcombine -simplifycfg | llvm-dis > %t
22 ; RUN: grep -v declare %t | not grep fail
3 ; RUN: grep -v declare %t | grep -c pass | grep 4
3 ; RUN: grep -v declare %t | grep pass | count 4
44
55 void %test1(int %x) {
66 entry:
0 ; Test that the ExitInMainOptimization pass works correctly
11 ; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | \
2 ; RUN: grep -c {ret i32 3} | grep 1
2 ; RUN: grep {ret i32 3} | count 1
33 ; END.
44
55 declare void %exit(int)