some peepholes that should match horizontal add/sub operations.
authorChris Lattner <sabre@nondot.org>
Mon, 3 Sep 2012 02:58:21 +0000 (02:58 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 3 Sep 2012 02:58:21 +0000 (02:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163103 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/README-SSE.txt

index 624e56fa0f6488dc0d2b84f30d38102c48684fb7..40110353fc6237ade72586ab2f1e3e2ed8f507c7 100644 (file)
@@ -941,3 +941,15 @@ and inversion with an rsqrtss instruction, which computes 1/sqrt faster at the
 cost of reduced accuracy.
 
 //===---------------------------------------------------------------------===//
+
+This function should be matched to haddpd when the appropriate CPU is enabled:
+
+#include <x86intrin.h>
+double f (__m128d p) {
+  return p[0] + p[1];
+}
+
+similarly, v[0]-v[1] should match to hsubpd, and {v[0]-v[1], w[0]-w[1]} should
+turn into hsubpd also.
+
+//===---------------------------------------------------------------------===//