[PATCH] D18405: [PPC] Prefer floating point load to integer load plus direct move, when there is no other user for the integer load
Chad Rosier via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 5 12:19:16 PDT 2016
mcrosier added a subscriber: mcrosier.
================
Comment at: lib/Target/PowerPC/PPCISelLowering.cpp:6309
@@ +6308,3 @@
+
+ //Only look at the users of the loaded value.
+ if (UI.getUse().get().getResNo() != 0)
----------------
Please add a space between the "//" and the 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())
----------------
The calls to the Subtarget.* are likely very cheap, while the call to directMoveIsProfitable is less so. I'd suggest checking the directMoveIsProfitable() last.
================
Comment at: test/CodeGen/PowerPC/direct-move-profit.ll:6
@@ +5,3 @@
+
+;CHECK-LABEL: test1
+
----------------
Please add a space after the semicolon.
http://reviews.llvm.org/D18405
More information about the llvm-commits
mailing list