]> granicus.if.org Git - clang/commit
[PPC64LE] Fix vec_sld and vec_vsldoi for little endian
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>
Wed, 11 Jun 2014 15:48:46 +0000 (15:48 +0000)
committerBill Schmidt <wschmidt@linux.vnet.ibm.com>
Wed, 11 Jun 2014 15:48:46 +0000 (15:48 +0000)
commita04f51fdfec64bd6ea1679832a1a75c8d3ecc68a
treeacdb095e13df7b95cea80c297a568e74bea2a9cf
parentc9ec1c267c72ecb1ef787bde6d420b20742fcdfc
[PPC64LE] Fix vec_sld and vec_vsldoi for little endian

The vec_sld and vec_vsldoi interfaces perform a left-shift on vector
arguments for both big and little endian.  However, because they rely
on the vec_perm interface which is endian-dependent, the permutation
vector needs to be reversed for LE to get the proper shift direction.

I've added some extra testing for these interfaces for LE in the
builtins-ppc-altivec.c.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210657 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Headers/altivec.h
test/CodeGen/builtins-ppc-altivec.c