[llvm-commits] CVS: llvm/test/Regression/Transforms/SimplifyLibCalls/FFS.ll

Reid Spencer reid at x10sys.com
Sat May 14 09:44:54 PDT 2005



Changes in directory llvm/test/Regression/Transforms/SimplifyLibCalls:

FFS.ll added (r1.1)
---
Log message:

Add a test case for testing ffs libcall conversion to constant


---
Diffs of the changes:  (+23 -0)

 FFS.ll |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+)


Index: llvm/test/Regression/Transforms/SimplifyLibCalls/FFS.ll
diff -c /dev/null llvm/test/Regression/Transforms/SimplifyLibCalls/FFS.ll:1.1
*** /dev/null	Sat May 14 11:44:53 2005
--- llvm/test/Regression/Transforms/SimplifyLibCalls/FFS.ll	Sat May 14 11:44:43 2005
***************
*** 0 ****
--- 1,23 ----
+ ; Test that the ToAsciiOptimizer works correctly
+ ; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | not grep 'call.*%ffs'
+ 
+ declare int %ffs(int)
+ declare int %ffsl(int)
+ declare int %ffsll(long)
+ 
+ implementation   ; Functions:
+ 
+ int %main () {
+   %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
+   ret int %rslt5
+ }






More information about the llvm-commits mailing list