diff options
| author | Reid Spencer <rspencer@reidspencer.com> | 2005-05-15 21:26:59 +0000 |
|---|---|---|
| committer | Reid Spencer <rspencer@reidspencer.com> | 2005-05-15 21:26:59 +0000 |
| commit | 597618f9f8490c4fa0c1861653b5c46dcb8bd63d (patch) | |
| tree | 1943ed1c04e05ddff32646f8147b599a5d2f4cc6 /llvm/test/Regression/Transforms/SimplifyLibCalls | |
| parent | 17f7784c5d636d7cbed92440eaa5736e91c2619d (diff) | |
| download | bcm5719-llvm-597618f9f8490c4fa0c1861653b5c46dcb8bd63d.tar.gz bcm5719-llvm-597618f9f8490c4fa0c1861653b5c46dcb8bd63d.zip | |
Add a case with non-constant argument for testing the transform:
ffs(x) -> (x == 0 ? 0 : llvm.cttz(0)+1)
llvm-svn: 22069
Diffstat (limited to 'llvm/test/Regression/Transforms/SimplifyLibCalls')
| -rw-r--r-- | llvm/test/Regression/Transforms/SimplifyLibCalls/FFS.ll | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/test/Regression/Transforms/SimplifyLibCalls/FFS.ll b/llvm/test/Regression/Transforms/SimplifyLibCalls/FFS.ll index 35b5d3fb6c7..4981d13b6df 100644 --- a/llvm/test/Regression/Transforms/SimplifyLibCalls/FFS.ll +++ b/llvm/test/Regression/Transforms/SimplifyLibCalls/FFS.ll @@ -4,12 +4,17 @@ declare int %ffs(int) declare int %ffsl(int) declare int %ffsll(long) +declare int %__builtin_ffs(int) + +%non_const = external global int implementation ; Functions: 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) + %val2 = call int %__builtin_ffs(int 2048) %val3 = call int %ffsl(int 65536) %val4 = call int %ffsll(long 1024) %val5 = call int %ffsll(long 17179869184) @@ -19,5 +24,6 @@ int %main () { %rslt3 = add int %val5, %val6 %rslt4 = add int %rslt1, %rslt2 %rslt5 = add int %rslt4, %rslt3 + %rslt6 = add int %rslt5, %val0 ret int %rslt5 } |

