llvm.org GIT mirror llvm / 7361f63
Let some more tests ignore expected output on stderr. Also, use > %t instead of -o %t for output in one test since that also works when %t already exists. This fixes 6 testcases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52178 91177308-0d34-0410-b5e6-96231b3b80d8 Matthijs Kooijman 11 years ago
6 changed file(s) with 7 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
None ;RUN: llvm-as < %s | opt -analyze -print-cfg-only -disable-output
0 ;RUN: llvm-as < %s | opt -analyze -print-cfg-only -disable-output 2>/dev/null
11 ;PR 1497
22
33 define void @foo() {
None ; RUN: llvm-as < /dev/null | not opt --foo > /dev/null
0 ; RUN: llvm-as < /dev/null | not opt --foo >& /dev/null
11
22 ; there is no --foo
None ; RUN: llvm-as < %s | opt -block-placement -disable-output -print
0 ; RUN: llvm-as < %s | opt -block-placement -disable-output -print 2> /dev/null
11
22 define i32 @test() {
33 br i1 true, label %X, label %Y
None ; RUN: llvm-as < %s | opt -inline -disable-output -print
0 ; RUN: llvm-as < %s | opt -inline -disable-output -print 2> /dev/null
11
22 define i32 @func(i32 %i) {
33 ret i32 %i
22 ; Internalize all but foo and j
33 ; RUN: llvm-as < %s | opt -internalize -internalize-public-api-list foo -internalize-public-api-list j | llvm-dis | grep internal | count 3
44 ; Non existent files should be treated as if they were empty (so internalize all but main)
5 ; RUN: llvm-as < %s | opt -internalize -internalize-public-api-file /nonexistent/file | llvm-dis | grep internal | count 4
6 ; RUN: llvm-as < %s | opt -internalize -internalize-public-api-list bar -internalize-public-api-list foo -internalize-public-api-file /nonexistent/file | llvm-dis | grep internal | count 3
5 ; RUN: llvm-as < %s | opt -internalize -internalize-public-api-file /nonexistent/file 2> /dev/null | llvm-dis | grep internal | count 4
6 ; RUN: llvm-as < %s | opt -internalize -internalize-public-api-list bar -internalize-public-api-list foo -internalize-public-api-file /nonexistent/file 2> /dev/null | llvm-dis | grep internal | count 3
77 ; -file and -list options should be merged, the .apifile contains foo and j
88 ; RUN: llvm-as < %s | opt -internalize -internalize-public-api-list bar -internalize-public-api-file %s.apifile | llvm-dis | grep internal | count 2
99
0 ; This should turn into one multiply and one add.
11
22 ; RUN: llvm-as < %s | \
3 ; RUN: opt -instcombine -reassociate -instcombine | llvm-dis -o %t
3 ; RUN: opt -instcombine -reassociate -instcombine | llvm-dis > %t
44 ; RUN: grep mul %t | count 1
55 ; RUN: grep add %t | count 1
66