blob: d6040603f094df8bf4b636eef062e25596795b41 [file] [log] [blame]
Reid Spencer0bc07502005-04-25 07:29:30 +00001; Test that the StrCatOptimizer works correctly
2; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | grep strlen
3; XFAIL: *
4
5declare sbyte* %strcat(sbyte*,sbyte*)
6%hello = constant [6 x sbyte] c"hello\00"
7
8implementation ; Functions:
9
10int %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}