[llvm-commits] CVS: llvm/test/Transforms/SimplifyLibCalls/Printf.ll
Chris Lattner
sabre at nondot.org
Fri Apr 13 18:18:11 PDT 2007
Changes in directory llvm/test/Transforms/SimplifyLibCalls:
Printf.ll added (r1.1)
---
Log message:
new testcase
---
Diffs of the changes: (+20 -0)
Printf.ll | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+)
Index: llvm/test/Transforms/SimplifyLibCalls/Printf.ll
diff -c /dev/null llvm/test/Transforms/SimplifyLibCalls/Printf.ll:1.1
*** /dev/null Fri Apr 13 20:17:48 2007
--- llvm/test/Transforms/SimplifyLibCalls/Printf.ll Fri Apr 13 20:17:38 2007
***************
*** 0 ****
--- 1,20 ----
+ ; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | grep putchar &&
+ ; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | not grep 'call.*printf'
+
+ @str = internal constant [13 x i8] c"hello world\0A\00" ; <[13 x i8]*> [#uses=1]
+ @str1 = internal constant [2 x i8] c"h\00" ; <[2 x i8]*> [#uses=1]
+
+ define void @foo() {
+ entry:
+ %tmp1 = tail call i32 (i8*, ...)* @printf( i8* getelementptr ([13 x i8]* @str, i32 0, i32 0) ) ; <i32> [#uses=0]
+ ret void
+ }
+
+ declare i32 @printf(i8*, ...)
+
+ define void @bar() {
+ entry:
+ %tmp1 = tail call i32 (i8*, ...)* @printf( i8* getelementptr ([2 x i8]* @str1, i32 0, i32 0) ) ; <i32> [#uses=0]
+ ret void
+ }
+
More information about the llvm-commits
mailing list