llvm.org GIT mirror llvm / 4953e92
For PR1913: Convert to new test system. This exposes test/Transforms/ConstProp/calls.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36027 91177308-0d34-0410-b5e6-96231b3b80d8 Reid Spencer 12 years ago
9 changed file(s) with 31 addition(s) and 22 deletion(s). Raw diff Collapse all Expand all
33
44 ; Fix #2: The unary not instruction now no longer exists. Change to xor.
55
6 ; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | not grep 'int 0'
6 ; RUN: llvm-upgrade < $test | llvm-as | opt -constprop | llvm-dis | \
7 ; RUN: not grep {int 0}
78
89 int "test1"() {
910 %R = xor int 123, -1
None ; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | not grep 'ret bool false'
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | \
1 ; RUN: not grep {ret bool false}
12
23 %b = external global [2 x { }]
34
None ; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | grep 'i32 -1' &&
1 ; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | not grep zeroinitializer
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | \
1 ; RUN: grep {i32 -1}
2 ; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | \
3 ; RUN: not grep zeroinitializer
24
35 < 4 x uint> %test() {
46 %tmp40 = bitcast <2 x long> bitcast (<4 x int> < int 0, int 0, int -1, int 0 > to <2 x long>) to <4 x uint>
None ; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep 'ret i1 false'
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | \
1 ; RUN: grep {ret i1 false}
12 bool %test() {
23 %X = trunc uint 320 to bool
34 ret bool %X
None ; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | grep 'ret i32 -1' &&
1 ; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | grep 'ret i32 1'
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | \
1 ; RUN: grep {ret i32 -1}
2 ; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | \
3 ; RUN: grep {ret i32 1}
24
35 int %test1() {
46 %A = sext bool true to int
None ; RUN: llvm-as < %s | llvm-dis | grep 'global i32 0'
0 ; RUN: llvm-as < %s | llvm-dis | grep {global i32 0}
11 ; PR1215
22
33 @G = global i32 sdiv (i32 0, i32 -1)
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | not grep call
11
2 declare double %cos(double)
3 declare double %sin(double)
4 declare double %tan(double)
5 declare double %sqrt(double)
6 declare bool %llvm.isunordered(double, double)
2 declare double %cos.f64(double)
3 declare double %sin.f64(double)
4 declare double %tan.f64(double)
5 declare double %sqrt.f64(double)
6 declare bool %llvm.isunordered.f64(double, double)
77
88 double %T() {
9 %A = call double %cos(double 0.0)
10 %B = call double %sin(double 0.0)
9 %A = call double %cos.f64(double 0.0)
10 %B = call double %sin.f64(double 0.0)
1111 %a = add double %A, %B
12 %C = call double %tan(double 0.0)
12 %C = call double %tan.f64(double 0.0)
1313 %b = add double %a, %C
14 %D = call double %sqrt(double 4.0)
14 %D = call double %sqrt.f64(double 4.0)
1515 %c = add double %b, %D
1616 ret double %c
1717 }
1818
1919 bool %TNAN() {
20 %A = call bool %llvm.isunordered(double 0x7FF8000000000000, double 1.0) ;; it's a nan!
21 %B = call bool %llvm.isunordered(double 123.0, double 1.0)
20 %A = call bool %llvm.isunordered.f64(double 0x7FF8000000000000, double 1.0) ;; it's a nan!
21 %B = call bool %llvm.isunordered.f64(double 123.0, double 1.0)
2222 %C = or bool %A, %B
2323 ret bool %C
2424 }
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 | opt -constprop | llvm-dis | grep -F 'ret i32* null' | wc -l | grep 2
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | \
1 ; RUN: grep -F {ret i32* null} | wc -l | grep 2
2
13 int* %test1() {
24 %X = cast float 0.0 to int*
35 ret int* %X