[llvm] r287987 - [X86] Remove hasOneUse check that is redundant with the one in IsProfitableToFold.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 26 10:43:26 PST 2016
Author: ctopper
Date: Sat Nov 26 12:43:26 2016
New Revision: 287987
URL: http://llvm.org/viewvc/llvm-project?rev=287987&view=rev
Log:
[X86] Remove hasOneUse check that is redundant with the one in IsProfitableToFold.
Modified:
llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp
Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp?rev=287987&r1=287986&r2=287987&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Sat Nov 26 12:43:26 2016
@@ -1519,7 +1519,6 @@ bool X86DAGToDAGISel::selectScalarSSELoa
if (N.getOpcode() == ISD::SCALAR_TO_VECTOR && N.getNode()->hasOneUse()) {
PatternNodeWithChain = N.getOperand(0);
if (ISD::isNON_EXTLoad(PatternNodeWithChain.getNode()) &&
- PatternNodeWithChain.hasOneUse() &&
IsProfitableToFold(PatternNodeWithChain, N.getNode(), Root) &&
IsLegalToFold(PatternNodeWithChain, N.getNode(), Root, OptLevel)) {
LoadSDNode *LD = cast<LoadSDNode>(PatternNodeWithChain);
@@ -1536,7 +1535,6 @@ bool X86DAGToDAGISel::selectScalarSSELoa
N.getOperand(0).getNode()->hasOneUse()) {
PatternNodeWithChain = N.getOperand(0).getOperand(0);
if (ISD::isNON_EXTLoad(PatternNodeWithChain.getNode()) &&
- PatternNodeWithChain.hasOneUse() &&
IsProfitableToFold(PatternNodeWithChain, N.getNode(), Root) &&
IsLegalToFold(PatternNodeWithChain, N.getNode(), Root, OptLevel)) {
// Okay, this is a zero extending load. Fold it.
More information about the llvm-commits
mailing list