Reid Spencer | bb4cae7 | 2005-04-29 07:19:00 +0000 | [diff] [blame^] | 1 | ; Test that the StrCatOptimizer works correctly |
2 | ; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | not grep 'call.*fputc' | ||||
3 | %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] } | ||||
4 | %struct._IO_marker = type { %struct._IO_marker*, %struct._IO_FILE*, int } | ||||
5 | %stdout = external global %struct._IO_FILE* ; <%struct._IO_FILE**> [#uses=1] | ||||
6 | |||||
7 | implementation ; Functions: | ||||
8 | |||||
9 | declare int %fputc(int, %struct._IO_FILE*) | ||||
10 | |||||
11 | int %main() { | ||||
12 | entry: | ||||
13 | %tmp.1 = load %struct._IO_FILE** %stdout ; <%struct._IO_FILE*> [#uses=1] | ||||
14 | %tmp.0 = call int %fputc( int 61, %struct._IO_FILE* %tmp.1 ) ; <int> [#uses=0] | ||||
15 | ret int 0 | ||||
16 | } |