diff options
author | Dale Johannesen <dalej@apple.com> | 2008-02-25 22:29:22 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2008-02-25 22:29:22 +0000 |
commit | 14e2ea9a557069ecf6383dde509badb3070b8057 (patch) | |
tree | 26b8efcd558a6ae41f7c698c9699181cac70eef4 /lib/Target | |
parent | 437d452adbc1ec58e73d9fd0dbfe345c69289a23 (diff) | |
download | external_llvm-14e2ea9a557069ecf6383dde509badb3070b8057.zip external_llvm-14e2ea9a557069ecf6383dde509badb3070b8057.tar.gz external_llvm-14e2ea9a557069ecf6383dde509badb3070b8057.tar.bz2 |
Revise previous patch per review.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47573 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r-- | lib/Target/X86/X86ISelLowering.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index 31f80ec..60604ac 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -5885,6 +5885,7 @@ static SDOperand PerformSTORECombine(StoreSDNode *St, SelectionDAG &DAG, isa<LoadSDNode>(St->getValue()) && !cast<LoadSDNode>(St->getValue())->isVolatile() && St->getChain().hasOneUse() && !St->isVolatile()) { + SDNode* LdVal = St->getValue().Val; LoadSDNode *Ld = 0; int TokenFactorIndex = -1; SmallVector<SDOperand, 8> Ops; @@ -5892,14 +5893,12 @@ static SDOperand PerformSTORECombine(StoreSDNode *St, SelectionDAG &DAG, // Must be a store of a load. We currently handle two cases: the load // is a direct child, and it's under an intervening TokenFactor. It is // possible to dig deeper under nested TokenFactors. - if (ChainVal == St->getValue().Val) + if (ChainVal == LdVal) Ld = cast<LoadSDNode>(St->getChain()); else if (St->getValue().hasOneUse() && ChainVal->getOpcode() == ISD::TokenFactor) { for (unsigned i=0, e = ChainVal->getNumOperands(); i != e; ++i) { - if (ChainVal->getOperand(i).Val == St->getValue().Val) { - if (TokenFactorIndex != -1) - return SDOperand(); + if (ChainVal->getOperand(i).Val == LdVal) { TokenFactorIndex = i; Ld = cast<LoadSDNode>(St->getValue()); } else |