37 lines · plain
1// REQUIRES: arm-registered-target2/// Ensures that when targeting an ARM target with an Asm file, clang3/// collects the features from the FPU. This is critical in the4/// activation of NEON for supported targets. The Cortex-R52 will be5/// used and tested for VFP and NEON Support6 7// RUN: %clang -target arm-none-eabi -mcpu=cortex-r52 -c %s -o /dev/null 2>&1 | FileCheck --check-prefix=CHECK-STDERR %s --allow-empty8// RUN: %clang -target arm-none-eabi -mcpu=cortex-r52 -c %s -o /dev/null -### 2>&1 | FileCheck --check-prefix=CHECK-TARGET-FEATURES %s9 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 cc1as15// 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, s224 vadd.f64 d0, d1, d225 vcvt.u32.f32 s0, s0, #126 vcvt.u32.f64 d0, d0, #127 vcvtb.f32.f16 s0, s128 vcvtb.f64.f16 d0, s129 vfma.f32 s0, s1, s230 vfma.f64 d0, d1, d231 vcvta.u32.f32 s0, s132 vcvta.u32.f64 s0, d133 vadd.f32 q0, q1, q234 vcvt.f32.f16 q0, d135 vfma.f32 q0, q1, q236 vcvta.u32.f32 q0, q137