////////////////////////////////////////////////////////////////////////////////
// Vector fused multiply-add operations
-def VFMA : SInst<"vfma", "dddd", "fQf">;
+let ArchGuard = "defined(__ARM_FEATURE_FMA)" in {
+ def VFMA : SInst<"vfma", "dddd", "fQf">;
+ def VFMS : SInst<"vfms", "dddd", "fQf">;
+}
////////////////////////////////////////////////////////////////////////////////
// fp16 vector operations
////////////////////////////////////////////////////////////////////////////////
// Vector fused multiply-add operations
def FMLA : SInst<"vfma", "dddd", "dQd">;
-def FMLS : SInst<"vfms", "dddd", "fdQfQd">;
+def FMLS : SInst<"vfms", "dddd", "dQd">;
////////////////////////////////////////////////////////////////////////////////
// MUL, MLA, MLS, FMA, FMS definitions with scalar argument
--- /dev/null
+// RUN: %clang_cc1 -triple thumbv7s-apple-ios7.0 -target-feature +neon -fsyntax-only -verify %s
+#include <arm_neon.h>
+
+// expected-no-diagnostics
+
+void func(float32x2_t v2f32, float32x4_t v4f32) {
+ vfma_f32(v2f32, v2f32, v2f32);
+ vfmaq_f32(v4f32, v4f32, v4f32);
+
+ vfms_f32(v2f32, v2f32, v2f32);
+ vfmsq_f32(v4f32, v4f32, v4f32);
+}