Reid Spencer | 0bc0750 | 2005-04-25 07:29:30 +0000 | [diff] [blame^] | 1 | ; Test that the StrCatOptimizer works correctly |
| 2 | ; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | grep strlen |
| 3 | ; XFAIL: * |
| 4 | |
| 5 | declare sbyte* %strcat(sbyte*,sbyte*) |
| 6 | %hello = constant [6 x sbyte] c"hello\00" |
| 7 | |
| 8 | implementation ; Functions: |
| 9 | |
| 10 | int %main () { |
| 11 | %target = alloca [1024 x sbyte] |
| 12 | %arg1 = getelementptr [1024 x sbyte]* %target, int 0, int 0 |
| 13 | %arg2 = getelementptr [6 x sbyte]* %hello, int 0, int 0 |
| 14 | %rslt = call sbyte* %strcat(sbyte* %arg1, sbyte* %arg2) |
| 15 | ret int 0 |
| 16 | } |