From ba3ba8fa1ff843ce5cd27239e225ae0f194e7a99 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 3 Sep 2012 02:58:21 +0000 Subject: some peepholes that should match horizontal add/sub operations. llvm-svn: 163103 --- llvm/lib/Target/X86/README-SSE.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'llvm/lib/Target') diff --git a/llvm/lib/Target/X86/README-SSE.txt b/llvm/lib/Target/X86/README-SSE.txt index 624e56fa0f6..40110353fc6 100644 --- a/llvm/lib/Target/X86/README-SSE.txt +++ b/llvm/lib/Target/X86/README-SSE.txt @@ -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 +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. + +//===---------------------------------------------------------------------===// -- cgit v1.2.3