From 1cf7c64fa525bb59eb91151bac343ca46d050144 Mon Sep 17 00:00:00 2001 From: Bill Schmidt Date: Fri, 13 Jun 2014 18:30:06 +0000 Subject: [PATCH] [PPC64LE] Run some existing Altivec tests on powerpc64le as well 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 . This is also fixed by this patch. llvm-svn: 210928 --- clang/lib/Headers/altivec.h | 2 +- clang/test/Driver/altivec-asm.S | 1 + clang/test/Parser/altivec-csk-bool.c | 1 + clang/test/Parser/altivec.c | 2 ++ clang/test/Parser/cxx-altivec.cpp | 2 ++ 5 files changed, 7 insertions(+), 1 deletion(-) diff --git a/clang/lib/Headers/altivec.h b/clang/lib/Headers/altivec.h index bee9e2de8a51..7a4a774f7b09 100644 --- a/clang/lib/Headers/altivec.h +++ b/clang/lib/Headers/altivec.h @@ -4194,7 +4194,7 @@ static vector bool short __ATTRS_o_ai 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 diff --git a/clang/test/Driver/altivec-asm.S b/clang/test/Driver/altivec-asm.S index 4143d520f4a8..3f78b58e6424 100644 --- a/clang/test/Driver/altivec-asm.S +++ b/clang/test/Driver/altivec-asm.S @@ -1,3 +1,4 @@ // 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 diff --git a/clang/test/Parser/altivec-csk-bool.c b/clang/test/Parser/altivec-csk-bool.c index 88d78c88b2bd..c1c253958c66 100644 --- a/clang/test/Parser/altivec-csk-bool.c +++ b/clang/test/Parser/altivec-csk-bool.c @@ -1,4 +1,5 @@ // 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 diff --git a/clang/test/Parser/altivec.c b/clang/test/Parser/altivec.c index 436a3afd2d07..0b8147a3b7b0 100644 --- a/clang/test/Parser/altivec.c +++ b/clang/test/Parser/altivec.c @@ -1,4 +1,6 @@ // 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; diff --git a/clang/test/Parser/cxx-altivec.cpp b/clang/test/Parser/cxx-altivec.cpp index 27cab2c9c411..565decc601f8 100644 --- a/clang/test/Parser/cxx-altivec.cpp +++ b/clang/test/Parser/cxx-altivec.cpp @@ -1,4 +1,6 @@ // 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;