Index: lib/Basic/Targets.cpp =================================================================== --- lib/Basic/Targets.cpp +++ lib/Basic/Targets.cpp @@ -4927,7 +4927,7 @@ Builder.defineMacro("__ARM_FP16_ARGS", "1"); // ACLE 6.5.3 Fused multiply-accumulate (FMA) - if (ArchVersion >= 7 && (CPUProfile != "M" || CPUAttr == "7EM")) + if (ArchVersion >= 7 && (FPU & VFP4FPU)) Builder.defineMacro("__ARM_FEATURE_FMA", "1"); // Subtarget options. Index: test/CodeGen/arm-neon-fma.c =================================================================== --- test/CodeGen/arm-neon-fma.c +++ test/CodeGen/arm-neon-fma.c @@ -1,6 +1,6 @@ // RUN: %clang_cc1 -triple thumbv7-none-linux-gnueabihf \ // RUN: -target-abi aapcs \ -// RUN: -target-cpu cortex-a8 \ +// RUN: -target-cpu cortex-a7 \ // RUN: -mfloat-abi hard \ // RUN: -ffreestanding \ // RUN: -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s Index: test/Preprocessor/arm-acle-6.5.c =================================================================== --- test/Preprocessor/arm-acle-6.5.c +++ test/Preprocessor/arm-acle-6.5.c @@ -49,10 +49,13 @@ // CHECK-NO-FMA-NOT: __ARM_FEATURE_FMA -// RUN: %clang -target armv7a-eabi -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-FMA -// RUN: %clang -target armv7r-eabi -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-FMA +// RUN: %clang -target armv7a-eabi -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-NO-FMA +// RUN: %clang -target armv7a-eabi -mfpu=vfpv4 -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-FMA +// RUN: %clang -target armv7r-eabi -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-NO-FMA +// RUN: %clang -target armv7r-eabi -mfpu=vfpv4 -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-FMA // RUN: %clang -target armv7em-eabi -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-FMA -// RUN: %clang -target armv8-eabi -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-FMA +// RUN: %clang -target armv8-eabi -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-NO-FMA +// RUN: %clang -target armv8-eabi -mfpu=vfpv4 -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-FMA // CHECK-FMA: __ARM_FEATURE_FMA 1 Index: test/Sema/arm_vfma.c =================================================================== --- test/Sema/arm_vfma.c +++ test/Sema/arm_vfma.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple thumbv7s-apple-ios7.0 -target-feature +neon -fsyntax-only -verify %s +// RUN: %clang_cc1 -triple thumbv7s-apple-ios7.0 -target-feature +neon -target-feature +vfp4 -fsyntax-only -verify %s #include // expected-no-diagnostics