[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / clang / test / CodeGen / arm-fp16-arguments.c
blobf27b2507238efc6df86613637627e76dd2d53db6
1 // RUN: %clang_cc1 -triple armv7a--none-eabi -target-abi aapcs -mfloat-abi soft -emit-llvm -o - -O2 %s | FileCheck %s --check-prefix=CHECK --check-prefix=SOFT
2 // RUN: %clang_cc1 -triple armv7a--none-eabi -target-abi aapcs -mfloat-abi hard -emit-llvm -o - -O2 %s | FileCheck %s --check-prefix=CHECK --check-prefix=HARD
3 // RUN: %clang_cc1 -triple armv7a--none-eabi -target-abi aapcs -mfloat-abi soft -fnative-half-arguments-and-returns -emit-llvm -o - -O2 %s | FileCheck %s --check-prefix=CHECK --check-prefix=NATIVE
5 __fp16 g;
7 void t1(__fp16 a) { g = a; }
8 // SOFT: define{{.*}} void @t1(half noundef [[PARAM:%.*]])
9 // HARD: define{{.*}} arm_aapcs_vfpcc void @t1(half noundef [[PARAM:%.*]])
10 // NATIVE: define{{.*}} void @t1(half noundef [[PARAM:%.*]])
11 // CHECK: store half [[PARAM]], ptr @g
13 __fp16 t2(void) { return g; }
14 // SOFT: define{{.*}} half @t2()
15 // HARD: define{{.*}} arm_aapcs_vfpcc half @t2()
16 // NATIVE: define{{.*}} half @t2()
17 // CHECK: [[LOAD:%.*]] = load half, ptr @g
18 // CHECK: ret half [[LOAD]]
20 _Float16 h;
22 void t3(_Float16 a) { h = a; }
23 // SOFT: define{{.*}} void @t3(half noundef [[PARAM:%.*]])
24 // HARD: define{{.*}} arm_aapcs_vfpcc void @t3(half noundef [[PARAM:%.*]])
25 // NATIVE: define{{.*}} void @t3(half noundef [[PARAM:%.*]])
26 // CHECK: store half [[PARAM]], ptr @h
28 _Float16 t4(void) { return h; }
29 // SOFT: define{{.*}} half @t4()
30 // HARD: define{{.*}} arm_aapcs_vfpcc half @t4()
31 // NATIVE: define{{.*}} half @t4()
32 // CHECK: [[LOAD:%.*]] = load half, ptr @h
33 // CHECK: ret half [[LOAD]]