| 1 |
// REQUIRES: arm-registered-target |
| 2 |
/// Ensures that when targeting an ARM target with an Asm file, clang |
| 3 |
/// collects the features from the FPU. This is critical in the |
| 4 |
/// activation of NEON for supported targets. The Cortex-R52 will be |
| 5 |
/// used and tested for VFP and NEON Support |
| 6 |
|
| 7 |
// RUN: %clang -target arm-none-eabi -mcpu=cortex-r52 -c %s -o /dev/null 2>&1 | FileCheck --check-prefix=CHECK-STDERR %s --allow-empty |
| 8 |
// RUN: %clang -target arm-none-eabi -mcpu=cortex-r52 -c %s -o /dev/null -### 2>&1 | FileCheck --check-prefix=CHECK-TARGET-FEATURES %s |
| 9 |
|
| 10 |
/// Check that no errors or warnings are present when assembling using cc1as. |
| 11 |
// CHECK-STDERR-NOT: error: |
| 12 |
// CHECK-STDERR-NOT: warning: |
| 13 |
|
| 14 |
/// Check that NEON and VFPV5 have been activated when using Cortex-R52 when using cc1as |
| 15 |
// CHECK-TARGET-FEATURES: "-target-feature" "+vfp2sp" |
| 16 |
// CHECK-TARGET-FEATURES: "-target-feature" "+vfp3" |
| 17 |
// CHECK-TARGET-FEATURES: "-target-feature" "+fp-armv8" |
| 18 |
// CHECK-TARGET-FEATURES: "-target-feature" "+fp-armv8d16" |
| 19 |
// CHECK-TARGET-FEATURES: "-target-feature" "+fp-armv8d16sp" |
| 20 |
// CHECK-TARGET-FEATURES: "-target-feature" "+fp-armv8sp" |
| 21 |
// CHECK-TARGET-FEATURES: "-target-feature" "+neon" |
| 22 |
|
| 23 |
vadd.f32 s0, s1, s2 |
| 24 |
vadd.f64 d0, d1, d2 |
| 25 |
vcvt.u32.f32 s0, s0, #1 |
| 26 |
vcvt.u32.f64 d0, d0, #1 |
| 27 |
vcvtb.f32.f16 s0, s1 |
| 28 |
vcvtb.f64.f16 d0, s1 |
| 29 |
vfma.f32 s0, s1, s2 |
| 30 |
vfma.f64 d0, d1, d2 |
| 31 |
vcvta.u32.f32 s0, s1 |
| 32 |
vcvta.u32.f64 s0, d1 |
| 33 |
vadd.f32 q0, q1, q2 |
| 34 |
vcvt.f32.f16 q0, d1 |
| 35 |
vfma.f32 q0, q1, q2 |
| 36 |
vcvta.u32.f32 q0, q1 |