Brian Gaeke | 226563f | 2003-06-23 19:59:17 +0000 | [diff] [blame] | 1 | |
Reid Spencer | d0e30dc | 2006-12-02 04:23:10 +0000 | [diff] [blame] | 2 | ; RUN: llvm-upgrade < %s | llvm-as | llc -march=c > %t1.cbe.c |
John Criswell | 0da9a84 | 2003-09-26 16:43:51 +0000 | [diff] [blame] | 3 | ; RUN: gcc -B/usr/bin/ %t1.cbe.c -o %t1.cbe |
Duncan Sands | b063fa5 | 2007-07-23 15:23:35 +0000 | [diff] [blame^] | 4 | ; RUN: ./%t1.cbe |
Brian Gaeke | 226563f | 2003-06-23 19:59:17 +0000 | [diff] [blame] | 5 | |
| 6 | bool %doTest(ubyte %x) { |
| 7 | %dec.0 = add ubyte %x, 255 |
Reid Spencer | 6c38f0b | 2006-11-27 01:05:10 +0000 | [diff] [blame] | 8 | %tmp.1001 = trunc ubyte %dec.0 to bool |
Brian Gaeke | 226563f | 2003-06-23 19:59:17 +0000 | [diff] [blame] | 9 | ret bool %tmp.1001 |
| 10 | } |
| 11 | |
| 12 | int %main () { |
| 13 | %result = call bool %doTest(ubyte 1) |
| 14 | %p = cast bool %result to int |
| 15 | ret int %p |
| 16 | } |