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

Sean Fertile via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 5 11:37:44 PDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL307185: [Power9] Disable removing extra swaps on P9. (authored by sfertile).

Changed prior to commit:
  https://reviews.llvm.org/D34627?vs=104861&id=105314#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D34627

Files:
  llvm/trunk/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp


Index: llvm/trunk/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp
===================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp
+++ llvm/trunk/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp
@@ -195,8 +195,10 @@
       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;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34627.105314.patch
Type: text/x-patch
Size: 658 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170705/062b253e/attachment.bin>


More information about the llvm-commits mailing list