diff options
author | Bill Schmidt <wschmidt@linux.vnet.ibm.com> | 2014-10-10 15:09:28 +0000 |
---|---|---|
committer | Bill Schmidt <wschmidt@linux.vnet.ibm.com> | 2014-10-10 15:09:28 +0000 |
commit | cfc4a54a48c3015bb732f62241d109b5df6dec43 (patch) | |
tree | 6f36d012faeab46d6a3669c17c26139c58773838 /llvm/lib/Target/PowerPC/PPCSubtarget.cpp | |
parent | 98bd58ca33b433c5cb3744891e25bbfd1b15d845 (diff) | |
download | llvm-cfc4a54a48c3015bb732f62241d109b5df6dec43.zip llvm-cfc4a54a48c3015bb732f62241d109b5df6dec43.tar.gz llvm-cfc4a54a48c3015bb732f62241d109b5df6dec43.tar.bz2 |
[PowerPC] Add feature for Power8 vector extensions
The current VSX feature for PowerPC specifies availability of the VSX
instructions added with the 2.06 architecture version. With 2.07, the
architecture adds new instructions to both the Category:Vector and
Category:VSX instruction sets. Additionally, unaligned vector storage
operations have improved performance.
This patch adds a feature to provide access to the new instructions
and performance capabilities of Power8. For compatibility with GCC,
the feature is controlled via a new -mpower8-vector switch, and the
feature causes the __POWER8_VECTOR__ builtin define to be generated by
the preprocessor.
There is a companion patch for cfe being committed at the same time.
llvm-svn: 219501
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCSubtarget.cpp')
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCSubtarget.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCSubtarget.cpp b/llvm/lib/Target/PowerPC/PPCSubtarget.cpp index ba8bda9..8d00be8 100644 --- a/llvm/lib/Target/PowerPC/PPCSubtarget.cpp +++ b/llvm/lib/Target/PowerPC/PPCSubtarget.cpp @@ -94,6 +94,7 @@ void PPCSubtarget::initializeEnvironment() { HasSPE = false; HasQPX = false; HasVSX = false; + HasPower8Vector = false; HasFCPSGN = false; HasFSQRT = false; HasFRE = false; @@ -155,8 +156,10 @@ void PPCSubtarget::initSubtargetFeatures(StringRef CPU, StringRef FS) { // FIXME: For now, we disable VSX in little-endian mode until endian // issues in those instructions can be addressed. - if (IsLittleEndian) + if (IsLittleEndian) { HasVSX = false; + HasPower8Vector = false; + } // Determine default ABI. if (TargetABI == PPC_ABI_UNKNOWN) { |