[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / CodeGen / aarch64-attr-mode-complex.c
blob3691330f03c5f4c88db32b9095b01862d46bd67f
1 // RUN: %clang_cc1 -triple arm64-none-linux-gnu -emit-llvm %s -o - | FileCheck %s
3 typedef _Complex float c16a __attribute((mode(HC)));
4 typedef _Complex double c16b __attribute((mode(HC)));
5 typedef _Complex float c32a __attribute((mode(SC)));
6 typedef _Complex double c32b __attribute((mode(SC)));
7 typedef _Complex float c64a __attribute((mode(DC)));
8 typedef _Complex double c64b __attribute((mode(DC)));
10 // CHECK: define{{.*}} { half, half } @c16_test([2 x half] noundef {{.*}}
11 // CHECK: ret { half, half } {{.*}}
12 c16b c16_test(c16a x) {
13 return x + x;
16 // CHECK: define{{.*}} { float, float } @c32_test([2 x float] noundef {{.*}})
17 // CHECK: ret { float, float } {{.*}}
18 c32b c32_test(c32a x) {
19 return x + x;
22 // CHECK: define{{.*}} { double, double } @c64_test([2 x double] noundef {{.*}})
23 // CHECK: ret { double, double } {{.*}}
24 c64b c64_test(c64a x) {
25 return x + x;