Refine Cell's i64 constant generation code to cover more constants where the
[oota-llvm.git] / test / CodeGen / CBackend / 2003-06-23-PromotedExprs.llx
1
2 ; RUN: llvm-as < %s | llc -march=c > %t1.cbe.c
3 ; RUN: gcc -B/usr/bin/ %t1.cbe.c -o %t1.cbe
4 ; RUN: ./%t1.cbe
5
6 define i1 @doTest(i8 %x) {
7         %dec.0 = add i8 %x, -1          ; <i8> [#uses=1]
8         %tmp.1001 = trunc i8 %dec.0 to i1               ; <i1> [#uses=1]
9         ret i1 %tmp.1001
10 }
11
12 define i32 @main() {
13         %result = call i1 @doTest( i8 1 )               ; <i1> [#uses=1]
14         %p = zext i1 %result to i32             ; <i32> [#uses=1]
15         ret i32 %p
16 }
17