diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-01-17 07:59:14 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-01-17 07:59:14 +0000 |
commit | 83b3d8267225d585678d5d3af9bba5735f4b415d (patch) | |
tree | 9d6c2ad7bfd568186e83a39e6f03e1c0bf415715 /llvm/test/Transforms/SimplifyLibCalls/Puts.ll | |
parent | 100602d7561ca5e245db6194bddae86357d203d4 (diff) | |
download | bcm5719-llvm-83b3d8267225d585678d5d3af9bba5735f4b415d.tar.gz bcm5719-llvm-83b3d8267225d585678d5d3af9bba5735f4b415d.zip |
Regression is gone, don't try to find it on clean target.
llvm-svn: 33296
Diffstat (limited to 'llvm/test/Transforms/SimplifyLibCalls/Puts.ll')
-rw-r--r-- | llvm/test/Transforms/SimplifyLibCalls/Puts.ll | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/llvm/test/Transforms/SimplifyLibCalls/Puts.ll b/llvm/test/Transforms/SimplifyLibCalls/Puts.ll new file mode 100644 index 00000000000..4011a82fa9f --- /dev/null +++ b/llvm/test/Transforms/SimplifyLibCalls/Puts.ll @@ -0,0 +1,26 @@ +; Test that the PutsCatOptimizer works correctly +; RUN: llvm-upgrade < %s | llvm-as | opt -simplify-libcalls | llvm-dis | not grep 'call.*fputs' +; +%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] + +declare int %fputs(sbyte*, %struct._IO_FILE*) + +%empty = constant [1 x sbyte] c"\00" +%len1 = constant [2 x sbyte] c"A\00" +%long = constant [7 x sbyte] c"hello\0A\00" + +implementation ; Functions: + +int %main() { +entry: + %out = load %struct._IO_FILE** %stdout + %s1 = getelementptr [1 x sbyte]* %empty, int 0, int 0 + %s2 = getelementptr [2 x sbyte]* %len1, int 0, int 0 + %s3 = getelementptr [7 x sbyte]* %long, int 0, int 0 + %a = call int %fputs( sbyte* %s1, %struct._IO_FILE* %out ) + %b = call int %fputs( sbyte* %s2, %struct._IO_FILE* %out ) + %c = call int %fputs( sbyte* %s3, %struct._IO_FILE* %out ) + ret int 0 +} |