blob: 35b5d3fb6c7d9f0b27e0970fddba5e485809d720 [file] [log] [blame]
Reid Spencerc6e3d5e2005-05-14 16:44:43 +00001; Test that the ToAsciiOptimizer works correctly
2; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | not grep 'call.*%ffs'
3
4declare int %ffs(int)
5declare int %ffsl(int)
6declare int %ffsll(long)
7
8implementation ; Functions:
9
10int %main () {
11 %val1 = call int %ffs(int 1)
12 %val2 = call int %ffs(int 2048)
13 %val3 = call int %ffsl(int 65536)
14 %val4 = call int %ffsll(long 1024)
15 %val5 = call int %ffsll(long 17179869184)
16 %val6 = call int %ffsll(long 1152921504606846976)
17 %rslt1 = add int %val1, %val2
18 %rslt2 = add int %val3, %val4
19 %rslt3 = add int %val5, %val6
20 %rslt4 = add int %rslt1, %rslt2
21 %rslt5 = add int %rslt4, %rslt3
22 ret int %rslt5
23}