blob: e5b6a3e65b5d8d271fc4ffd2908b6206d57f1755 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; 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 Spencerf234bed2007-07-19 23:13:04 +00005%ZFunTy = type i33(i8 zeroext)
6%SFunTy = type i33(i8 signext)
Dan Gohmanf17a25c2007-07-18 16:29:46 +00007
Reid Spencerf234bed2007-07-19 23:13:04 +00008declare i16 @"test"(i16 signext %arg) signext
9declare i8 @"test2" (i16 zeroext %a2) zeroext
Dan Gohmanf17a25c2007-07-18 16:29:46 +000010
11
12define i33 @main(i33 %argc, i8 **%argv) {
13 %val = trunc i33 %argc to i16
Reid Spencerf234bed2007-07-19 23:13:04 +000014 %res = call i16 (i16 signext) signext *@test(i16 %val)
Dan Gohmanf17a25c2007-07-18 16:29:46 +000015 %two = add i16 %res, %res
Reid Spencerf234bed2007-07-19 23:13:04 +000016 %res2 = call i8 @test2(i16 %two zeroext) zeroext
Dan Gohmanf17a25c2007-07-18 16:29:46 +000017 %retVal = sext i16 %two to i33
18 ret i33 %retVal
19}