xref: /aosp_15_r20/external/clang/test/CodeGenObjC/compound-literal-property-access.m (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li// RUN: %clang_cc1 %s -emit-llvm -triple x86_64-apple-darwin -o - | FileCheck %s
2*67e74705SXin Li// rdar://20407999
3*67e74705SXin Li
4*67e74705SXin Litypedef __attribute__((__ext_vector_type__(2))) float vector_float2;
5*67e74705SXin Li
6*67e74705SXin Li@interface GPAgent2D
7*67e74705SXin Li@property (nonatomic, assign) vector_float2 position;
8*67e74705SXin Li@end
9*67e74705SXin Li
10*67e74705SXin Li@interface GPGoal @end
11*67e74705SXin Li
12*67e74705SXin Li@implementation GPGoal
13*67e74705SXin Li-(void)getForce {
14*67e74705SXin Li    GPAgent2D* targetAgent;
15*67e74705SXin Li    (vector_float2){targetAgent.position.x, targetAgent.position.y};
16*67e74705SXin Li}
17*67e74705SXin Li@end
18*67e74705SXin Li
19*67e74705SXin Li// CHECK: [[CL:%.*]] = alloca <2 x float>, align 8
20*67e74705SXin Li// CHECK: store <2 x float> [[VECINIT:%.*]], <2 x float>* [[CL]]
21*67e74705SXin Li// CHECK: [[FOURTEEN:%.*]] = load <2 x float>, <2 x float>* [[CL]]
22