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

Renato Golin via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 26 06:33:38 PDT 2016


rengolin added inline comments.

================
Comment at: lib/Basic/Targets.cpp:4710
@@ -4709,1 +4709,3 @@
                  const std::vector<std::string> &FeaturesVec) const override {
+    if (CPU == "")
+      CPU = "generic";
----------------
This change is unrelated and may bring side effects into clang. I'd keep this out and investigate it in another patch with the appropriate tests. If you just force the target-feature in the test, this corner case won't be relevant in this patch.

================
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 -fsyntax-only -verify %s
 #include <arm_neon.h>
----------------
This test should not be relying on the front-end getting the feature right, it should be forcing the vfpv4 target feature on a base arch like "arm-none-eabi".

================
Comment at: test/Sema/neon-vector-types-support.c:1
@@ -1,2 +1,2 @@
-// RUN: %clang_cc1 %s -triple armv7 -fsyntax-only -verify
+// RUN: %clang_cc1 %s -triple armv7 -target-feature -neon -fsyntax-only -verify
 
----------------
This change seems unrelated?


http://reviews.llvm.org/D18963





More information about the cfe-commits mailing list