diff options
| author | Reid Spencer <rspencer@reidspencer.com> | 2005-04-29 07:19:00 +0000 |
|---|---|---|
| committer | Reid Spencer <rspencer@reidspencer.com> | 2005-04-29 07:19:00 +0000 |
| commit | fc4cf1d4358ee532a5232764dfebdb6cfdde8668 (patch) | |
| tree | a881dc294c0dcd891881e96e43f09ff0a041418d /llvm/test/Regression/Transforms/SimplifyLibCalls/Puts.ll | |
| parent | 26456403257003ff2c09324dc095b56b67a14752 (diff) | |
| download | bcm5719-llvm-fc4cf1d4358ee532a5232764dfebdb6cfdde8668.tar.gz bcm5719-llvm-fc4cf1d4358ee532a5232764dfebdb6cfdde8668.zip | |
Add a test case for the puts libcall optimization.
llvm-svn: 21616
Diffstat (limited to 'llvm/test/Regression/Transforms/SimplifyLibCalls/Puts.ll')
| -rw-r--r-- | llvm/test/Regression/Transforms/SimplifyLibCalls/Puts.ll | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/test/Regression/Transforms/SimplifyLibCalls/Puts.ll b/llvm/test/Regression/Transforms/SimplifyLibCalls/Puts.ll new file mode 100644 index 00000000000..3bbc70e45ad --- /dev/null +++ b/llvm/test/Regression/Transforms/SimplifyLibCalls/Puts.ll @@ -0,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 +} |

