[PATCH] D18963: PR27216: Only define __ARM_FEATURE_FMA when the target has VFPv4

silviu.baranga@arm.com via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 12 08:01:51 PDT 2016


sbaranga added inline comments.

================
Comment at: test/Sema/arm_vfma.c:1
@@ -1,2 +1,2 @@
-// 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 <arm_neon.h>
----------------
t.p.northover wrote:
> rengolin wrote:
> > t.p.northover wrote:
> > > v7s is Swift, which has FMA. v7 for us is Cortex-A9, which I think also has FMA (not that it matters much these days).
> > v7 is Cortex-A8, and neither A8 nor A9 have FMA in VFP, only NEON.
> > 
> > Does Swift have FMA in VFP? or just NEON?
> Sorry, it appears virtually every part of my statement was wrong then. v7 really does seem to be Cortex-A8 even for us, and Swift doesn't have scalar VFMA.
The error seems to be coming from how the getDefaultFPU() is called when the cpu is not specified. It turns out that it gets called with an empty CPU string (perhaps we meant to call with either "generic" or the CPU that was set in ARMTargetInfo (which does get correctly recognized as swift in this case).

FWIW, Cortex-A9 doesn't have FMA,


http://reviews.llvm.org/D18963





More information about the cfe-commits mailing list