1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00

Add definitions for the PPC a2q core marked as having QPX available

This is the first commit of a large series which will add support for the
QPX vector instruction set to the PowerPC backend. This instruction set is
used on the IBM Blue Gene/Q supercomputers.

llvm-svn: 173973
This commit is contained in:
Hal Finkel 2013-01-30 21:17:42 +00:00
parent 7ab8793a0a
commit 7969f87a01
3 changed files with 19 additions and 0 deletions

View File

@ -58,6 +58,8 @@ def FeatureISEL : SubtargetFeature<"isel","HasISEL", "true",
"Enable the isel instruction">;
def FeatureBookE : SubtargetFeature<"booke", "IsBookE", "true",
"Enable Book E instructions">;
def FeatureQPX : SubtargetFeature<"qpx","HasQPX", "true",
"Enable QPX instructions">;
//===----------------------------------------------------------------------===//
// Register File Description
@ -109,6 +111,11 @@ def : Processor<"a2", PPCA2Itineraries, [DirectiveA2, FeatureBookE,
FeatureSTFIWX, FeatureISEL,
Feature64Bit
/*, Feature64BitRegs */]>;
def : Processor<"a2q", PPCA2Itineraries, [DirectiveA2, FeatureBookE,
FeatureMFOCRF, FeatureFSqrt,
FeatureSTFIWX, FeatureISEL,
Feature64Bit /*, Feature64BitRegs */,
FeatureQPX]>;
def : Processor<"pwr6", G5Itineraries,
[DirectivePwr6, FeatureAltivec,
FeatureMFOCRF, FeatureFSqrt, FeatureSTFIWX,

View File

@ -70,6 +70,7 @@ protected:
bool Use64BitRegs;
bool IsPPC64;
bool HasAltivec;
bool HasQPX;
bool HasFSQRT;
bool HasSTFIWX;
bool HasISEL;
@ -150,6 +151,7 @@ public:
bool hasFSQRT() const { return HasFSQRT; }
bool hasSTFIWX() const { return HasSTFIWX; }
bool hasAltivec() const { return HasAltivec; }
bool hasQPX() const { return HasQPX; }
bool hasMFOCRF() const { return HasMFOCRF; }
bool hasISEL() const { return HasISEL; }
bool isBookE() const { return IsBookE; }

View File

@ -0,0 +1,10 @@
; RUN: llc < %s -march=ppc64 -mcpu=a2q | FileCheck %s
; RUN: llc < %s -march=ppc64 -mcpu=a2 -mattr=+qpx | FileCheck %s
define void @foo() {
entry:
ret void
}
; CHECK: @foo