forked from OSchip/llvm-project
[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
This commit is contained in:
parent
ac78daf517
commit
3cd1a0368c
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue