[PATCH] D34627: [Power9] Disable removing extra swaps on P9 since it should not be needed.

Stefan Pintilie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 26 08:56:32 PDT 2017


stefanp created this revision.

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.


https://reviews.llvm.org/D34627

Files:
  lib/Target/PowerPC/PPCTargetMachine.cpp


Index: lib/Target/PowerPC/PPCTargetMachine.cpp
===================================================================
--- lib/Target/PowerPC/PPCTargetMachine.cpp
+++ lib/Target/PowerPC/PPCTargetMachine.cpp
@@ -368,6 +368,7 @@
   // For little endian, remove where possible the vector swap instructions
   // introduced at code generation to normalize vector element order.
   if (TM->getTargetTriple().getArch() == Triple::ppc64le &&
+      !TM->getSubtargetImpl()->isISA3_0() &&
       !DisableVSXSwapRemoval)
     addPass(createPPCVSXSwapRemovalPass());
   // Target-specific peephole cleanups performed after instruction


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34627.103964.patch
Type: text/x-patch
Size: 621 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170626/fd7b4549/attachment.bin>


More information about the llvm-commits mailing list