[PATCH] D18405: [PPC] Prefer floating point load to integer load plus direct move, when there is no other user for the integer load

amehsan via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 5 12:28:46 PDT 2016


amehsan added inline comments.

================
Comment at: lib/Target/PowerPC/PPCISelLowering.cpp:6389
@@ -6364,2 +6388,3 @@
   // however, without FPCVT we can't do most conversions.
-  if (Subtarget.hasDirectMove() && Subtarget.isPPC64() && Subtarget.hasFPCVT())
+  if (Subtarget.hasDirectMove() && directMoveIsProfitable(Op) &&
+      Subtarget.isPPC64() && Subtarget.hasFPCVT())
----------------
mcrosier wrote:
> The calls to the Subtarget.* are likely very cheap, while the call to directMoveIsProfitable is less so.  I'd suggest checking the directMoveIsProfitable() last.
Actually, calls to the Subtarget.* are going to be always successful unless someone is compiling for Power 7 or below (which is not very likely) or is doing some work with the testcases. So for almost all practical purposes, we will always call directMoeIsProfitable and make the decision based on that. 


http://reviews.llvm.org/D18405





More information about the llvm-commits mailing list