summaryrefslogtreecommitdiff
path: root/lib/CodeGen/ModuleBuilder.cpp
diff options
context:
space:
mode:
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>2014-06-06 14:45:06 +0000
committerBill Schmidt <wschmidt@linux.vnet.ibm.com>2014-06-06 14:45:06 +0000
commit3e36cef34cf341a10cfae859d8e631d049d2d3a5 (patch)
treed96a7cc3809eb35154f119a3a72b3671ad2a1c20 /lib/CodeGen/ModuleBuilder.cpp
parentb3482791029bb619a7d561d3caa239aa47b60b5f (diff)
downloadclang-3e36cef34cf341a10cfae859d8e631d049d2d3a5.tar.gz
clang-3e36cef34cf341a10cfae859d8e631d049d2d3a5.tar.bz2
clang-3e36cef34cf341a10cfae859d8e631d049d2d3a5.tar.xz
[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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210337 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/ModuleBuilder.cpp')
0 files changed, 0 insertions, 0 deletions