[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / CodeGen / tbaa-vec.cpp
blobc1c54e6d8f3b9fa33f05caf75d4f12136d6380e7
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).
4 typedef float __m128 __attribute__ ((__vector_size__ (16)));
6 struct A {
7 __m128 a, b;
8 };
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, ptr %{{.*}}, align 16, !tbaa [[TAG_char:!.*]]
14 // CHECK: store <4 x float> %{{.*}}, ptr %{{.*}}, align 16, !tbaa [[TAG_char]]
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}