NEON cannot be used if we require full precision FP.
BUG=4540719
Change-Id: I157d8d90bfa7eb0cf8da34bcf210d6e318e4e034
diff --git a/lib/ExecutionEngine/Compiler.cpp b/lib/ExecutionEngine/Compiler.cpp
index 8a55e38..5895057 100644
--- a/lib/ExecutionEngine/Compiler.cpp
+++ b/lib/ExecutionEngine/Compiler.cpp
@@ -302,6 +302,14 @@
if (hasError())
goto on_bcc_compile_error;
+#if defined(ARCH_ARM_HAVE_NEON)
+ // Full-precision means we have to disable NEON
+ if (ME.getRSFloatPrecision() == bcinfo::RS_FP_Full) {
+ Features.push_back("-neon");
+ Features.push_back("-neonfp");
+ }
+#endif
+
if (!CPU.empty() || !Features.empty()) {
llvm::SubtargetFeatures F;