Snap for 7550930 from 1653633152c36803198f49545d67bef59137f182 to mainline-resolv-release

Change-Id: I899cd13b2d517afe247c5d59c9043b652b0059ac
diff --git a/Android.bp b/Android.bp
index 3b967ed..2e6828b 100644
--- a/Android.bp
+++ b/Android.bp
@@ -12,10 +12,26 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+package {
+    default_applicable_licenses: ["external_psimd_license"],
+}
+
+// Added automatically by a large-scale-change
+// See: http://go/android-license-faq
+license {
+    name: "external_psimd_license",
+    visibility: [":__subpackages__"],
+    license_kinds: [
+        "SPDX-license-identifier-MIT",
+    ],
+    license_text: [
+        "LICENSE",
+    ],
+}
+
 cc_library_headers {
     name: "psimd_headers",
     export_include_dirs: ["include"],
     vendor_available: true,
     sdk_version: "current",
 }
-
diff --git a/METADATA b/METADATA
index 5b1c1a4..364e59b 100644
--- a/METADATA
+++ b/METADATA
@@ -1,7 +1,5 @@
 name: "psimd"
-description:
-    "Portable 128-bit SIMD intrinsics"
-
+description: "Portable 128-bit SIMD intrinsics"
 third_party {
   url {
     type: HOMEPAGE
@@ -11,7 +9,11 @@
     type: GIT
     value: "https://github.com/Maratyszcza/psimd"
   }
-  version: "10b4ffc6ea9e2e11668f86969586f88bc82aaefa"
-  last_upgrade_date { year: 2020 month: 2 day: 3 }
+  version: "072586a71b55b7f8c584153d223e95687148a900"
   license_type: NOTICE
+  last_upgrade_date {
+    year: 2020
+    month: 5
+    day: 18
+  }
 }
diff --git a/NOTICE b/NOTICE
deleted file mode 120000
index 7a694c9..0000000
--- a/NOTICE
+++ /dev/null
@@ -1 +0,0 @@
-LICENSE
\ No newline at end of file
diff --git a/include/psimd.h b/include/psimd.h
index 1aa1014..b7cb65d 100644
--- a/include/psimd.h
+++ b/include/psimd.h
@@ -28,7 +28,7 @@
 	#define PSIMD_INTRINSIC static
 #endif
 
-#if defined(__GNUC__)
+#if defined(__GNUC__) || defined(__clang__)
 	#if defined(__ARM_NEON__) || defined(__ARM_NEON)
 		#include <arm_neon.h>
 	#endif
@@ -78,7 +78,7 @@
 	#include <stdint.h>
 #endif
 
-#if defined(__GNUC__)
+#if defined(__GNUC__) || defined(__clang__)
 	#define PSIMD_HAVE_F64 0
 	#define PSIMD_HAVE_F32 1
 	#define PSIMD_HAVE_U8 1
@@ -664,10 +664,10 @@
 		#if defined(__aarch64__) || defined(__ARM_NEON__) && defined(__ARM_FEATURE_FMA)
 			return (psimd_f32) vfmaq_f32((float32x4_t) a, (float32x4_t) b, (float32x4_t) c);
 		#elif (defined(__x86_64__) || defined(__i386__) || defined(__i686__)) && defined(__FMA__)
-			return (psimd_f32) _mm_fmadd_ps((__m128) c, (__m128) a, (__m128) b);
+			return (psimd_f32) _mm_fmadd_ps((__m128) b, (__m128) c, (__m128) a);
 		#elif (defined(__x86_64__) || defined(__i386__) || defined(__i686__)) && defined(__FMA4__)
-			return (psimd_f32) _mm_macc_ps((__m128) c, (__m128) a, (__m128) b);
-		#elif defined(__wasm__) && defined(__wasm_simd128__) && defined(__clang__)
+			return (psimd_f32) _mm_macc_ps((__m128) b, (__m128) c, (__m128) a);
+		#elif defined(__wasm__) && defined(__wasm_simd128__) && defined(__clang__) && PSIMD_ENABLE_WASM_QFMA
 			return (psimd_f32) __builtin_wasm_qfma_f32x4(a, b, c);
 		#else
 			return a + b * c;