1 // RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm -o - -O1 -relaxed-aliasing -fsanitize=thread -disable-llvm-optzns %s | \
2 // RUN: FileCheck %s
3 // RUN: %clang_cc1 -triple x86_64-apple-darwin -new-struct-path-tbaa \
4 // RUN: -emit-llvm -o - -O1 -relaxed-aliasing -fsanitize=thread -disable-llvm-optzns %s | \
5 // RUN: FileCheck %s
6 //
7 // Check that we do not create tbaa for instructions generated for copies.
8
9 // CHECK-NOT: !tbaa
10
11 struct A {
12 short s;
13 int i;
14 char c;
15 int j;
16 };
17
copyStruct(A * a1,A * a2)18 void copyStruct(A *a1, A *a2) {
19 *a1 = *a2;
20 }
21
copyInt(int * a,int * b)22 void copyInt(int *a, int *b) {
23 *a = *b;
24 }
25