21 lines · cpp
1// RUN: %clang_cc1 -triple x86_64-apple-darwin -O1 -disable-llvm-passes %s -emit-llvm -o - | FileCheck %s2// Test TBAA metadata generated by front-end (vector types are always treated as mayalias).3 4typedef float __m128 __attribute__ ((__vector_size__ (16)));5 6struct A {7 __m128 a, b;8};9 10void foo(A *a, __m128 v) {11 // CHECK-LABEL: define{{.*}} void @_Z3fooP1ADv4_f12 a->a = v;13 // CHECK: store <4 x float> %v, ptr %{{.*}}, align 16, !tbaa [[TAG_char:!.*]]14 // CHECK: store <4 x float> %{{.*}}, ptr %{{.*}}, 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 21