summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorSean Fertile <sfertile@ca.ibm.com>2017-07-05 18:37:10 +0000
committerSean Fertile <sfertile@ca.ibm.com>2017-07-05 18:37:10 +0000
commit3cd1a0368ca2ede53a5b3e996b7c5cd36db4b0c1 (patch)
treea362c11f7bf7e22ec32b1d77b12c0597424d18b9 /llvm/lib
parentac78daf5171657b580a505dfaacab8a57f00d3db (diff)
downloadbcm5719-llvm-3cd1a0368ca2ede53a5b3e996b7c5cd36db4b0c1.tar.gz
bcm5719-llvm-3cd1a0368ca2ede53a5b3e996b7c5cd36db4b0c1.zip
[Power9] Disable removing extra swaps on P9.
On power 8 we sometimes insert swaps to deal with the difference between Little-Endian and Big-Endian. The swap removal pass is supposed to clean up these swaps. On power 9 we don't need this pass since we do not need to insert the swaps in the first place. Commiting on behalf of Stefan Pintilie. Differential Revision: https://reviews.llvm.org/D34627 llvm-svn: 307185
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp b/llvm/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp
index 491eaf326a5..7d34efd4af3 100644
--- a/llvm/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp
+++ b/llvm/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp
@@ -195,8 +195,10 @@ public:
return false;
// If we don't have VSX on the subtarget, don't do anything.
+ // Also, on Power 9 the load and store ops preserve element order and so
+ // the swaps are not required.
const PPCSubtarget &STI = MF.getSubtarget<PPCSubtarget>();
- if (!STI.hasVSX())
+ if (!STI.hasVSX() || !STI.needsSwapsForVSXMemOps())
return false;
bool Changed = false;
OpenPOWER on IntegriCloud