blob: e9580c6254161e917467d68a2fa676773418ca0b [file] [log] [blame]
Reid Spencerb2ae0782005-04-30 01:00:52 +00001; Test that the ToAsciiOptimizer works correctly
Reid Spencer69ccadd2006-12-02 04:23:10 +00002; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | not grep 'call.*toascii'
Reid Spencerb2ae0782005-04-30 01:00:52 +00003
4declare int %toascii(int)
5
6implementation ; Functions:
7
8int %main () {
9 %val1 = call int %toascii(int 1)
10 %val2 = call int %toascii(int 0)
11 %val3 = call int %toascii(int 127)
12 %val4 = call int %toascii(int 128)
13 %val5 = call int %toascii(int 255)
14 %val6 = call int %toascii(int 256)
15 %rslt1 = add int %val1, %val2
16 %rslt2 = add int %val3, %val4
17 %rslt3 = add int %val5, %val6
18 %rslt4 = add int %rslt1, %rslt2
19 %rslt5 = add int %rslt4, %rslt3
20 ret int %rslt5
21}