xref: /aosp_15_r20/external/clang/test/CodeGen/aarch64-arguments-hfa-v3.c (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li // RUN: %clang_cc1 -triple arm64-apple-ios -target-feature +neon -target-abi darwinpcs -fallow-half-arguments-and-returns -emit-llvm -o - %s | FileCheck %s
2*67e74705SXin Li 
3*67e74705SXin Li typedef __attribute__((__ext_vector_type__(16))) signed char int8x16_t;
4*67e74705SXin Li typedef __attribute__((__ext_vector_type__(3))) float float32x3_t;
5*67e74705SXin Li 
6*67e74705SXin Li // CHECK: %struct.HFAv3 = type { [4 x <3 x float>] }
7*67e74705SXin Li typedef struct { float32x3_t arr[4]; } HFAv3;
8*67e74705SXin Li 
9*67e74705SXin Li // CHECK: %struct.MixedHFAv3 = type { [3 x <3 x float>], <16 x i8> }
10*67e74705SXin Li typedef struct { float32x3_t arr[3]; int8x16_t b; } MixedHFAv3;
11*67e74705SXin Li 
12*67e74705SXin Li // CHECK: define %struct.HFAv3 @test([4 x <4 x float>] %{{.*}}, [4 x <4 x float>] %{{.*}}, [4 x <4 x float>] %{{.*}})
test(HFAv3 a0,HFAv3 a1,HFAv3 a2)13*67e74705SXin Li HFAv3 test(HFAv3 a0, HFAv3 a1, HFAv3 a2) {
14*67e74705SXin Li   return a2;
15*67e74705SXin Li }
16*67e74705SXin Li 
17*67e74705SXin Li // CHECK: define %struct.MixedHFAv3 @test_mixed([4 x <4 x float>] %{{.*}}, [4 x <4 x float>] %{{.*}}, [4 x <4 x float>] %{{.*}})
test_mixed(MixedHFAv3 a0,MixedHFAv3 a1,MixedHFAv3 a2)18*67e74705SXin Li MixedHFAv3 test_mixed(MixedHFAv3 a0, MixedHFAv3 a1, MixedHFAv3 a2) {
19*67e74705SXin Li   return a2;
20*67e74705SXin Li }
21