fix a crash on code that uses the result value of __builtin___memcpy_chk.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129892 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGen/builtin-memfns.c b/test/CodeGen/builtin-memfns.c
index 2ea6793..fb4d720 100644
--- a/test/CodeGen/builtin-memfns.c
+++ b/test/CodeGen/builtin-memfns.c
@@ -42,3 +42,9 @@
 void test5(char *P, char *Q) {
   __builtin___memmove_chk(P, Q, 128, 128);
 }
+
+// CHECK: @test6
+// CHECK: call void @llvm.memcpy
+int test6(char *X) {
+  return __builtin___memcpy_chk(X, X, 42, 42) != 0;
+}