diff options
author | Tanya Lattner <tonic@nondot.org> | 2008-03-10 07:21:50 +0000 |
---|---|---|
committer | Tanya Lattner <tonic@nondot.org> | 2008-03-10 07:21:50 +0000 |
commit | ceca194c4355224723b309a3a27c5e5bc19cb6fc (patch) | |
tree | d976e8cf9d933c32868d72a94d1ec2d9d7205735 /test/Transforms/SimplifyLibCalls/FFS.ll | |
parent | f79e60649a5edea03bdccf8521d77c15cbb33af4 (diff) |
Remove llvm-upgrade and update tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48137 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/SimplifyLibCalls/FFS.ll')
-rw-r--r-- | test/Transforms/SimplifyLibCalls/FFS.ll | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/test/Transforms/SimplifyLibCalls/FFS.ll b/test/Transforms/SimplifyLibCalls/FFS.ll index 7049b5a377..94228f0266 100644 --- a/test/Transforms/SimplifyLibCalls/FFS.ll +++ b/test/Transforms/SimplifyLibCalls/FFS.ll @@ -1,29 +1,30 @@ ; Test that the ToAsciiOptimizer works correctly -; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | \ +; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | \ ; RUN: not grep {call.*%ffs} -declare int %ffs(int) -declare int %ffsl(int) -declare int %ffsll(long) +@non_const = external global i32 ; <i32*> [#uses=1] -%non_const = external global int +declare i32 @ffs(i32) -implementation ; Functions: +declare i32 @ffsl(i32) -int %main () { - %arg = load int* %non_const - %val0 = call int %ffs(int %arg) - %val1 = call int %ffs(int 1) - %val2 = call int %ffs(int 2048) - %val3 = call int %ffsl(int 65536) - %val4 = call int %ffsll(long 1024) - %val5 = call int %ffsll(long 17179869184) - %val6 = call int %ffsll(long 1152921504606846976) - %rslt1 = add int %val1, %val2 - %rslt2 = add int %val3, %val4 - %rslt3 = add int %val5, %val6 - %rslt4 = add int %rslt1, %rslt2 - %rslt5 = add int %rslt4, %rslt3 - %rslt6 = add int %rslt5, %val0 - ret int %rslt5 +declare i32 @ffsll(i64) + +define i32 @main() { + %arg = load i32* @non_const ; <i32> [#uses=1] + %val0 = call i32 @ffs( i32 %arg ) ; <i32> [#uses=1] + %val1 = call i32 @ffs( i32 1 ) ; <i32> [#uses=1] + %val2 = call i32 @ffs( i32 2048 ) ; <i32> [#uses=1] + %val3 = call i32 @ffsl( i32 65536 ) ; <i32> [#uses=1] + %val4 = call i32 @ffsll( i64 1024 ) ; <i32> [#uses=1] + %val5 = call i32 @ffsll( i64 17179869184 ) ; <i32> [#uses=1] + %val6 = call i32 @ffsll( i64 1152921504606846976 ) ; <i32> [#uses=1] + %rslt1 = add i32 %val1, %val2 ; <i32> [#uses=1] + %rslt2 = add i32 %val3, %val4 ; <i32> [#uses=1] + %rslt3 = add i32 %val5, %val6 ; <i32> [#uses=1] + %rslt4 = add i32 %rslt1, %rslt2 ; <i32> [#uses=1] + %rslt5 = add i32 %rslt4, %rslt3 ; <i32> [#uses=2] + %rslt6 = add i32 %rslt5, %val0 ; <i32> [#uses=0] + ret i32 %rslt5 } + |