]> granicus.if.org Git - clang/commit
[PATCH][Power] Fix (and deprecate) vec_lvsl and vec_lvsr for little endian
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>
Mon, 6 Oct 2014 19:02:20 +0000 (19:02 +0000)
committerBill Schmidt <wschmidt@linux.vnet.ibm.com>
Mon, 6 Oct 2014 19:02:20 +0000 (19:02 +0000)
commit1818d2490417fbbca8516454514e59888682f1e2
tree34fffc0ee08f42ef440677e4672f28f977acd7dc
parent1fdd00ca697816eeb623f97ed835dc40ab4ae13a
[PATCH][Power] Fix (and deprecate) vec_lvsl and vec_lvsr for little endian

The use of the vec_lvsl and vec_lvsr interfaces are discouraged for
little endian targets since Power8 hardware is a minimum requirement,
and Power8 provides reasonable performance for unaligned vector loads
and stores.  Up till now we have not provided "correct" (i.e., big-
endian-compatible) code generation for these interfaces, as to do so
produces poorly performing code.  However, this has become the source
of too many questions.

With this patch, LLVM will now produce compatible code for these
interfaces, but will also produce a deprecation warning message for
PPC64LE when one of them is used.  This should make the porting direction
clearer to programmers.  A similar patch has recently been committed to
GCC.

This patch includes a test for the warning message.  There is a companion
patch that adds two unit tests to projects/test-suite.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219137 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Headers/altivec.h
test/Headers/altivec-intrin.c [new file with mode: 0644]