Let the strcat optimizer return the pointer to the start of the buffer,
instead of the place where it started to perform the string copy.
- PR3661
- Patch by Benjamin Kramer!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68443 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Transforms/SimplifyLibCalls/StrCat.ll b/test/Transforms/SimplifyLibCalls/StrCat.ll
index a6ef677..89ef4ea 100644
--- a/test/Transforms/SimplifyLibCalls/StrCat.ll
+++ b/test/Transforms/SimplifyLibCalls/StrCat.ll
@@ -1,6 +1,9 @@
; Test that the StrCatOptimizer works correctly
+; PR3661
; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | \
; RUN: not grep {call.*strcat}
+; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | \
+; RUN: grep {puts.*%arg1}
@hello = constant [6 x i8] c"hello\00" ; <[6 x i8]*> [#uses=1]
@null = constant [1 x i8] zeroinitializer ; <[1 x i8]*> [#uses=1]