diff options
author | Evan Cheng <evan.cheng@apple.com> | 2006-08-16 23:59:00 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2006-08-16 23:59:00 +0000 |
commit | eb8730d131be888ba93f7dfc2e5457375190107e (patch) | |
tree | 1fe44db97a6a153ecfb211f4e81b66e2e0259469 /lib/Target/X86/X86ISelDAGToDAG.cpp | |
parent | be384162c68641233deba8702666af51bdfd4b83 (diff) | |
download | external_llvm-eb8730d131be888ba93f7dfc2e5457375190107e.zip external_llvm-eb8730d131be888ba93f7dfc2e5457375190107e.tar.gz external_llvm-eb8730d131be888ba93f7dfc2e5457375190107e.tar.bz2 |
Doh. Incorrectly inverted condition. Also add a isOnlyUse check to match tablegen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29741 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86ISelDAGToDAG.cpp')
-rw-r--r-- | lib/Target/X86/X86ISelDAGToDAG.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Target/X86/X86ISelDAGToDAG.cpp b/lib/Target/X86/X86ISelDAGToDAG.cpp index 176314a..442fa8d 100644 --- a/lib/Target/X86/X86ISelDAGToDAG.cpp +++ b/lib/Target/X86/X86ISelDAGToDAG.cpp @@ -610,7 +610,8 @@ bool X86DAGToDAGISel::TryFoldLoad(SDOperand P, SDOperand N, SDOperand &Index, SDOperand &Disp) { if (N.getOpcode() == ISD::LOAD && N.hasOneUse() && - !CanBeFoldedBy(N.Val, P.Val)) + P.Val->isOnlyUse(N.Val) && + CanBeFoldedBy(N.Val, P.Val)) return SelectAddr(N.getOperand(1), Base, Scale, Index, Disp); return false; } |