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

Reid Spencer reid at x10sys.com
Fri Apr 29 00:19:14 PDT 2005



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

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

Add a test case for the puts libcall optimization.


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

 Puts.ll |   16 ++++++++++++++++
 1 files changed, 16 insertions(+)


Index: llvm/test/Regression/Transforms/SimplifyLibCalls/Puts.ll
diff -c /dev/null llvm/test/Regression/Transforms/SimplifyLibCalls/Puts.ll:1.1
*** /dev/null	Fri Apr 29 02:19:10 2005
--- llvm/test/Regression/Transforms/SimplifyLibCalls/Puts.ll	Fri Apr 29 02:19:00 2005
***************
*** 0 ****
--- 1,16 ----
+ ; Test that the StrCatOptimizer works correctly
+ ; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | not grep 'call.*fputc'
+ %struct._IO_FILE = type { int, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, sbyte*, %struct._IO_marker*, %struct._IO_FILE*, int, int, int, ushort, sbyte, [1 x sbyte], sbyte*, long, sbyte*, sbyte*, int, [52 x sbyte] }
+ %struct._IO_marker = type { %struct._IO_marker*, %struct._IO_FILE*, int }
+ %stdout = external global %struct._IO_FILE*		; <%struct._IO_FILE**> [#uses=1]
+ 
+ implementation   ; Functions:
+ 
+ declare int %fputc(int, %struct._IO_FILE*)
+ 
+ int %main() {
+ entry:
+     %tmp.1 = load %struct._IO_FILE** %stdout		; <%struct._IO_FILE*> [#uses=1]
+     %tmp.0 = call int %fputc( int 61, %struct._IO_FILE* %tmp.1 )		; <int> [#uses=0]
+     ret int 0
+ }






More information about the llvm-commits mailing list