after going around in circles a few times, finally cave and emit structure
copies with memcpy instead of memmove. This matches what GCC does and if it
causes a problem with a particular libc we can always fix it with a target
hook.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65699 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGen/struct-copy.c b/test/CodeGen/struct-copy.c
new file mode 100644
index 0000000..a45e37a
--- /dev/null
+++ b/test/CodeGen/struct-copy.c
@@ -0,0 +1,7 @@
+// RUN: clang -emit-llvm %s -o - | grep 'call.*llvm.memcpy'
+struct x { int a[100]; };
+
+
+void foo(struct x *P, struct x *Q) {
+ *P = *Q;
+}