blob: cb7d06c701f638dbf58c1190335feb860d305873 [file] [log] [blame]
Reid Spencerb2ae0782005-04-30 01:00:52 +00001; Test that the ToAsciiOptimizer works correctly
2; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | not grep 'call.*toascii'
3
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}