diff options
author | Bill Schmidt <wschmidt@linux.vnet.ibm.com> | 2014-06-06 14:45:06 +0000 |
---|---|---|
committer | Bill Schmidt <wschmidt@linux.vnet.ibm.com> | 2014-06-06 14:45:06 +0000 |
commit | 7c0114f6e373497855844a063e9c2d9c4966da58 (patch) | |
tree | 90c90552593c65e7ad788480466c0cd34a348b78 /llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp | |
parent | 4aedff8995d3e0788fd2e84079e5b19fcdf899c5 (diff) | |
download | bcm5719-llvm-7c0114f6e373497855844a063e9c2d9c4966da58.tar.gz bcm5719-llvm-7c0114f6e373497855844a063e9c2d9c4966da58.zip |
[PPC64LE] Implement little-endian semantics for vec_mul[eo]
The PowerPC vector-multiply-even and vector-multiply-odd instructions
are defined architecturally with a big-endian bias, in that the vector
element numbering is assumed to be "left to right" regardless of
whether the processor is in big-endian or little-endian mode. This
definition is unnatural for little-endian code generation.
To facilitate ease of porting, the vec_mule and vec_mulo interfacs are
designed to use natural element ordering, so that elements are
numbered according to little-endian design principles when code is
generated for a little-endian target. The desired semantics can be
achieved by using the opposite instruction for little-endian mode.
That is, when a call to vec_mule appears in the code, a
vector-multiply-odd is generated, and when a call to vec_mulo appears
in the code, a vector-multiply-even is generated.
The correctness of this code is tested by the new mult-even-odd.c test
added in a previous patch. I plan to later make the existing ppc32
Altivec compile-time tests work for ppc64 and ppc64le as well.
llvm-svn: 210337
Diffstat (limited to 'llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp')
0 files changed, 0 insertions, 0 deletions