Reid Spencer | c094836 | 2007-01-16 18:08:22 +0000 | [diff] [blame] | 1 | ; RUN: llvm-as < %s | llvm-dis > %t1.ll |
| 2 | ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll |
| 3 | ; RUN: diff %t1.ll %t2.ll |
| 4 | |
Reid Spencer | 9445e9a | 2007-07-19 23:13:04 +0000 | [diff] [blame] | 5 | %ZFunTy = type i33(i8 zeroext) |
| 6 | %SFunTy = type i33(i8 signext) |
Reid Spencer | c094836 | 2007-01-16 18:08:22 +0000 | [diff] [blame] | 7 | |
Reid Spencer | 9445e9a | 2007-07-19 23:13:04 +0000 | [diff] [blame] | 8 | declare i16 @"test"(i16 signext %arg) signext |
| 9 | declare i8 @"test2" (i16 zeroext %a2) zeroext |
Reid Spencer | c094836 | 2007-01-16 18:08:22 +0000 | [diff] [blame] | 10 | |
Reid Spencer | c094836 | 2007-01-16 18:08:22 +0000 | [diff] [blame] | 11 | |
Reid Spencer | e3ff5ad | 2007-01-26 08:25:06 +0000 | [diff] [blame] | 12 | define i33 @main(i33 %argc, i8 **%argv) { |
Reid Spencer | c094836 | 2007-01-16 18:08:22 +0000 | [diff] [blame] | 13 | %val = trunc i33 %argc to i16 |
Duncan Sands | dc02467 | 2007-11-27 13:23:08 +0000 | [diff] [blame] | 14 | %res = call i16 (i16 signext) signext *@test(i16 signext %val) signext |
Reid Spencer | c094836 | 2007-01-16 18:08:22 +0000 | [diff] [blame] | 15 | %two = add i16 %res, %res |
Reid Spencer | 9445e9a | 2007-07-19 23:13:04 +0000 | [diff] [blame] | 16 | %res2 = call i8 @test2(i16 %two zeroext) zeroext |
Reid Spencer | c094836 | 2007-01-16 18:08:22 +0000 | [diff] [blame] | 17 | %retVal = sext i16 %two to i33 |
| 18 | ret i33 %retVal |
| 19 | } |