Hal Finkel | c9fac9e | 2017-09-03 17:18:25 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -triple x86_64-apple-darwin -O1 -disable-llvm-passes %s -emit-llvm -o - | FileCheck %s |
| 2 | // Test TBAA metadata generated by front-end (vector types are always treated as mayalias). |
| 3 | |
| 4 | typedef float __m128 __attribute__ ((__vector_size__ (16))); |
| 5 | |
| 6 | struct A { |
| 7 | __m128 a, b; |
| 8 | }; |
| 9 | |
| 10 | void foo(A *a, __m128 v) { |
| 11 | // CHECK-LABEL: define void @_Z3fooP1ADv4_f |
| 12 | a->a = v; |
| 13 | // CHECK: store <4 x float> %v, <4 x float>* %{{.*}}, align 16, !tbaa [[TAG_char:!.*]] |
| 14 | // CHECK: store <4 x float> %{{.*}}, <4 x float>* %{{.*}}, align 16, !tbaa [[TAG_char]] |
| 15 | } |
| 16 | |
| 17 | // CHECK: [[TYPE_char:!.*]] = !{!"omnipotent char", [[TAG_cxx_tbaa:!.*]], |
| 18 | // CHECK: [[TAG_cxx_tbaa]] = !{!"Simple C++ TBAA"} |
| 19 | // CHECK: [[TAG_char]] = !{[[TYPE_char]], [[TYPE_char]], i64 0} |
| 20 | |