1 // RUN: %clang_cc1 -triple arm64-none-linux-gnu -emit-llvm %s -o - | FileCheck %s
2 
3 typedef float f16a __attribute((mode(HF)));
4 typedef double f16b __attribute((mode(HF)));
5 typedef float f32a __attribute((mode(SF)));
6 typedef double f32b __attribute((mode(SF)));
7 typedef float f64a __attribute((mode(DF)));
8 typedef double f64b __attribute((mode(DF)));
9 f16b tmp;
10 
11 // CHECK: define{{.*}} ptr @f16_test(ptr noundef {{.*}})
12 // CHECK:   store half {{.*}}, ptr @tmp, align 2
13 // CHECK:   ret ptr @tmp
14 f16b *f16_test(f16a *x) {
15   tmp = *x + *x;
16   return &tmp;
17 }
18 
19 // CHECK: define{{.*}} float @f32_test(float noundef {{.*}})
20 // CHECK:   ret float {{.*}}
21 f32b f32_test(f32a x) {
22   return x + x;
23 }
24 
25 // CHECK: define{{.*}} double @f64_test(double noundef {{.*}})
26 // CHECK:   ret double {{.*}}
27 f64b f64_test(f64a x) {
28   return x + x;
29 }
30