blob: 0bc2664d4298b486f3aea4485dba525b279516f4 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; Test that the ToAsciiOptimizer works correctly
2; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | \
3; RUN: not grep {call.*toascii}
4
5declare int %toascii(int)
6
7implementation ; Functions:
8
9int %main () {
10 %val1 = call int %toascii(int 1)
11 %val2 = call int %toascii(int 0)
12 %val3 = call int %toascii(int 127)
13 %val4 = call int %toascii(int 128)
14 %val5 = call int %toascii(int 255)
15 %val6 = call int %toascii(int 256)
16 %rslt1 = add int %val1, %val2
17 %rslt2 = add int %val3, %val4
18 %rslt3 = add int %val5, %val6
19 %rslt4 = add int %rslt1, %rslt2
20 %rslt5 = add int %rslt4, %rslt3
21 ret int %rslt5
22}