| 1 |
// RUN: %clang_cc1 -triple arm64-none-linux-gnu -emit-llvm %s -o - | FileCheck %s |
| 2 |
|
| 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))); |
| 9 |
|
| 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; |
| 14 |
} |
| 15 |
|
| 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; |
| 20 |
} |
| 21 |
|
| 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; |
| 26 |
} |