some peepholes that should match horizontal add/sub operations.

llvm-svn: 163103
This commit is contained in:
Chris Lattner 2012-09-03 02:58:21 +00:00
parent 30c0cb2f30
commit ba3ba8fa1f
1 changed files with 12 additions and 0 deletions

View 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.
//===---------------------------------------------------------------------===//