mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-12 17:32:19 +00:00
[PowerPC 4/4] Enable little-endian support for VSX.
With the foregoing three patches, VSX instructions can be used for little endian. This patch removes the restriction that prevented this, and re-enables the test cases from the first three patches. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223792 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9a2a305ed4
commit
44603b67b1
@ -154,13 +154,6 @@ void PPCSubtarget::initSubtargetFeatures(StringRef CPU, StringRef FS) {
|
|||||||
// Determine endianness.
|
// Determine endianness.
|
||||||
IsLittleEndian = (TargetTriple.getArch() == Triple::ppc64le);
|
IsLittleEndian = (TargetTriple.getArch() == Triple::ppc64le);
|
||||||
|
|
||||||
// FIXME: For now, we disable VSX in little-endian mode until endian
|
|
||||||
// issues in those instructions can be addressed.
|
|
||||||
if (IsLittleEndian) {
|
|
||||||
HasVSX = false;
|
|
||||||
HasP8Vector = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Determine default ABI.
|
// Determine default ABI.
|
||||||
if (TargetABI == PPC_ABI_UNKNOWN) {
|
if (TargetABI == PPC_ABI_UNKNOWN) {
|
||||||
if (!isDarwin() && IsPPC64) {
|
if (!isDarwin() && IsPPC64) {
|
||||||
|
@ -1,13 +1,7 @@
|
|||||||
;; Note: This test case disable VSX until LE support is enabled, as
|
; RUN: llc -mcpu=pwr8 -mattr=+vsx -O2 -mtriple=powerpc64le-unknown-linux-gnu < %s > %t
|
||||||
;; otherwise we fail trying to deal with the @llvm.ppc.vsx.* builtins
|
; RUN: grep lxvd2x < %t | count 18
|
||||||
;; for loads and stores.
|
; RUN: grep stxvd2x < %t | count 18
|
||||||
; RUN: llc -mcpu=pwr8 -O2 -mtriple=powerpc64-unknown-linux-gnu < %s
|
; RUN: grep xxpermdi < %t | count 36
|
||||||
;; FIXME: Delete this and above lines when VSX LE support enabled.
|
|
||||||
|
|
||||||
; R;UN: llc -mcpu=pwr8 -mattr=+vsx -O2 -mtriple=powerpc64le-unknown-linux-gnu < %s > %t
|
|
||||||
; R;UN: grep lxvd2x < %t | count 18
|
|
||||||
; R;UN: grep stxvd2x < %t | count 18
|
|
||||||
; R;UN: grep xxpermdi < %t | count 36
|
|
||||||
|
|
||||||
@vf = global <4 x float> <float -1.500000e+00, float 2.500000e+00, float -3.500000e+00, float 4.500000e+00>, align 16
|
@vf = global <4 x float> <float -1.500000e+00, float 2.500000e+00, float -3.500000e+00, float 4.500000e+00>, align 16
|
||||||
@vd = global <2 x double> <double 3.500000e+00, double -7.500000e+00>, align 16
|
@vd = global <2 x double> <double 3.500000e+00, double -7.500000e+00>, align 16
|
||||||
|
@ -9,13 +9,10 @@
|
|||||||
; RUN: grep stxvw4x < %t | count 3
|
; RUN: grep stxvw4x < %t | count 3
|
||||||
; RUN: grep stxvd2x < %t | count 3
|
; RUN: grep stxvd2x < %t | count 3
|
||||||
|
|
||||||
;; Note: The LE test variant is disabled until LE support for VSX is enabled,
|
; RUN: llc -mcpu=pwr8 -mattr=+vsx -O2 -mtriple=powerpc64le-unknown-linux-gnu < %s > %t
|
||||||
;; as otherwise we fail to get the expected counts.
|
; RUN: grep lxvd2x < %t | count 6
|
||||||
|
; RUN: grep stxvd2x < %t | count 6
|
||||||
; R;UN: llc -mcpu=pwr8 -mattr=+vsx -O2 -mtriple=powerpc64le-unknown-linux-gnu < %s > %t
|
; RUN: grep xxpermdi < %t | count 12
|
||||||
; R;UN: grep lxvd2x < %t | count 6
|
|
||||||
; R;UN: grep stxvd2x < %t | count 6
|
|
||||||
; R;UN: grep xxpermdi < %t | count 12
|
|
||||||
|
|
||||||
@vsi = global <4 x i32> <i32 -1, i32 2, i32 -3, i32 4>, align 16
|
@vsi = global <4 x i32> <i32 -1, i32 2, i32 -3, i32 4>, align 16
|
||||||
@vui = global <4 x i32> <i32 0, i32 1, i32 2, i32 3>, align 16
|
@vui = global <4 x i32> <i32 0, i32 1, i32 2, i32 3>, align 16
|
||||||
|
@ -1,9 +1,4 @@
|
|||||||
; Note: This test is disabled until VSX is enabled for LE, as otherwise
|
; RUN: llc -mcpu=pwr8 -mattr=+vsx -mtriple=powerpc64le-unknown-linux-gnu < %s | FileCheck %s
|
||||||
; we don't get the correct code gen.
|
|
||||||
; RUN: llc -mcpu=pwr8 -mtriple=powerpc64-unknown-linux-gnu < %s
|
|
||||||
; FIXME: Remove this and all above lines when VSX is enabled for LE.
|
|
||||||
|
|
||||||
; R;UN: llc -mcpu=pwr8 -mattr=+vsx -mtriple=powerpc64le-unknown-linux-gnu < %s | FileCheck %s
|
|
||||||
|
|
||||||
define <2 x double> @testi0(<2 x double>* %p1, double* %p2) {
|
define <2 x double> @testi0(<2 x double>* %p1, double* %p2) {
|
||||||
%v = load <2 x double>* %p1
|
%v = load <2 x double>* %p1
|
||||||
|
@ -1,9 +1,4 @@
|
|||||||
; Note: This test is disabled until VSX is enabled for LE, as otherwise
|
; RUN: llc -mcpu=pwr8 -mattr=+vsx -mtriple=powerpc64le-unknown-linux-gnu < %s | FileCheck %s
|
||||||
; we don't get the correct code gen.
|
|
||||||
; RUN: llc -mcpu=pwr8 -mtriple=powerpc64-unknown-linux-gnu < %s
|
|
||||||
; FIXME: Remove this and all above lines when VSX is enabled for LE.
|
|
||||||
|
|
||||||
; R;UN: llc -mcpu=pwr8 -mattr=+vsx -mtriple=powerpc64le-unknown-linux-gnu < %s | FileCheck %s
|
|
||||||
|
|
||||||
define <2 x double> @test00(<2 x double>* %p1, <2 x double>* %p2) {
|
define <2 x double> @test00(<2 x double>* %p1, <2 x double>* %p2) {
|
||||||
%v1 = load <2 x double>* %p1
|
%v1 = load <2 x double>* %p1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user