blob: 7c78dd12dc9eade82e2033e5bb01c5781cf1c52d [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
Reid Spencer5fe85612005-04-25 15:40:35 +000013 store sbyte 0, sbyte* %arg1
Reid Spencer0bc07502005-04-25 07:29:30 +000014 %arg2 = getelementptr [6 x sbyte]* %hello, int 0, int 0
15 %rslt = call sbyte* %strcat(sbyte* %arg1, sbyte* %arg2)
16 ret int 0
17}