blob: f49b98ca901522bf4cebf7a696cbb17f12b1a987 [file] [log] [blame]
Brian Gaeke226563f2003-06-23 19:59:17 +00001
Reid Spencerd0e30dc2006-12-02 04:23:10 +00002; RUN: llvm-upgrade < %s | llvm-as | llc -march=c > %t1.cbe.c
John Criswell0da9a842003-09-26 16:43:51 +00003; RUN: gcc -B/usr/bin/ %t1.cbe.c -o %t1.cbe
Duncan Sandsb063fa52007-07-23 15:23:35 +00004; RUN: ./%t1.cbe
Brian Gaeke226563f2003-06-23 19:59:17 +00005
6bool %doTest(ubyte %x) {
7 %dec.0 = add ubyte %x, 255
Reid Spencer6c38f0b2006-11-27 01:05:10 +00008 %tmp.1001 = trunc ubyte %dec.0 to bool
Brian Gaeke226563f2003-06-23 19:59:17 +00009 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}