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

Reid Spencer reid at x10sys.com
Fri Apr 29 18:01:03 PDT 2005



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

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

A new test case for the ToAsciiOptimizer.


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

 ToAscii.ll |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+)


Index: llvm/test/Regression/Transforms/SimplifyLibCalls/ToAscii.ll
diff -c /dev/null llvm/test/Regression/Transforms/SimplifyLibCalls/ToAscii.ll:1.1
*** /dev/null	Fri Apr 29 20:01:02 2005
--- llvm/test/Regression/Transforms/SimplifyLibCalls/ToAscii.ll	Fri Apr 29 20:00:52 2005
***************
*** 0 ****
--- 1,21 ----
+ ; Test that the ToAsciiOptimizer works correctly
+ ; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | not grep 'call.*toascii'
+ 
+ declare int %toascii(int)
+ 
+ implementation   ; Functions:
+ 
+ int %main () {
+   %val1 = call int %toascii(int 1)
+   %val2 = call int %toascii(int 0)
+   %val3 = call int %toascii(int 127)
+   %val4 = call int %toascii(int 128)
+   %val5 = call int %toascii(int 255)
+   %val6 = call int %toascii(int 256)
+   %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