blob: d7f8e56213478c21d5576275f7b1490bdcc8eee6 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001
2; RUN: llvm-upgrade < %s | llvm-as | llc -march=c > %t1.cbe.c
3; RUN: gcc -B/usr/bin/ %t1.cbe.c -o %t1.cbe
4; RUN: %t1.cbe
5
6bool %doTest(ubyte %x) {
7 %dec.0 = add ubyte %x, 255
8 %tmp.1001 = trunc ubyte %dec.0 to bool
9 ret bool %tmp.1001
10}
11
12int %main () {
13 %result = call bool %doTest(ubyte 1)
14 %p = cast bool %result to int
15 ret int %p
16}