There are several Altivec tests that formerly ran only on big-endian
targets (and in some cases only on 32-bit targets). It is useful to
verify these on little-endian targets as well.
While testing these, I discovered a typo in <altivec.h>. This is also
fixed by this patch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210928
91177308-0d34-0410-b5e6-
96231b3b80d8
vec_pack(vector bool int __a, vector bool int __b)
{
#ifdef __LITTLE_ENDIAN__
- return (vector unsigned short)vec_perm(__a, __b, (vector unsigned char)
+ return (vector bool short)vec_perm(__a, __b, (vector unsigned char)
(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
#else
// RUN: %clang -target powerpc64-linux-gnu -maltivec -S %s -o - | FileCheck %s
+// RUN: %clang -target powerpc64le-linux-gnu -maltivec -S %s -o - | FileCheck %s
// Verify that assembling an empty file does not auto-include altivec.h.
// CHECK-NOT: static vector
// RUN: %clang_cc1 -triple powerpc64-unknown-linux-gnu -faltivec -fsyntax-only %s
+// RUN: %clang_cc1 -triple powerpc64le-unknown-linux-gnu -faltivec -fsyntax-only %s
// PR16456: Verify that bool, true, false are treated as context-sensitive
// keywords (and therefore available for use as identifiers) when in
// RUN: %clang_cc1 -triple=powerpc-apple-darwin8 -faltivec -fsyntax-only -verify %s
+// RUN: %clang_cc1 -triple=powerpc64-unknown-linux-gnu -faltivec -fsyntax-only -verify %s
+// RUN: %clang_cc1 -triple=powerpc64le-unknown-linux-gnu -faltivec -fsyntax-only -verify %s
__vector char vv_c;
__vector signed char vv_sc;
// RUN: %clang_cc1 -triple=powerpc-apple-darwin8 -faltivec -fsyntax-only -verify -std=c++11 %s
+// RUN: %clang_cc1 -triple=powerpc64-unknown-linux-gnu -faltivec -fsyntax-only -verify -std=c++11 %s
+// RUN: %clang_cc1 -triple=powerpc64le-unknown-linux-gnu -faltivec -fsyntax-only -verify -std=c++11 %s
__vector char vv_c;
__vector signed char vv_sc;