diff options
author | Sanjay Patel <spatel@rotateright.com> | 2015-07-28 23:05:48 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2015-07-28 23:05:48 +0000 |
commit | 1dd15598cf6ca4338509c90ec2f93957ba3ee229 (patch) | |
tree | c4d24325d9d450c5ed6d31434ed086ca6bc59b85 /llvm/lib/Target/X86/X86ISelLowering.cpp | |
parent | ef5c196fb04820c808b70288d58a9eca423091b1 (diff) | |
download | bcm5719-llvm-1dd15598cf6ca4338509c90ec2f93957ba3ee229.tar.gz bcm5719-llvm-1dd15598cf6ca4338509c90ec2f93957ba3ee229.zip |
fix TLI's combineRepeatedFPDivisors interface to return the minimum user threshold
This fix was suggested as part of D11345 and is part of fixing PR24141.
With this change, we can avoid walking the uses of a divisor node if the target
doesn't want the combineRepeatedFPDivisors transform in the first place.
There is no NFC-intended other than that.
Differential Revision: http://reviews.llvm.org/D11531
llvm-svn: 243498
Diffstat (limited to 'llvm/lib/Target/X86/X86ISelLowering.cpp')
-rw-r--r-- | llvm/lib/Target/X86/X86ISelLowering.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index a99cc206451..de4506dd4d8 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -13308,8 +13308,8 @@ SDValue X86TargetLowering::getRecipEstimate(SDValue Op, /// This is because we still need one division to calculate the reciprocal and /// then we need two multiplies by that reciprocal as replacements for the /// original divisions. -bool X86TargetLowering::combineRepeatedFPDivisors(unsigned NumUsers) const { - return NumUsers > 1; +unsigned X86TargetLowering::combineRepeatedFPDivisors() const { + return 2; } static bool isAllOnes(SDValue V) { |