aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-10-13 22:10:05 +0000
committerChris Lattner <sabre@nondot.org>2005-10-13 22:10:05 +0000
commit24edbb7a6cdf8adcd80086700448d59c59a810b9 (patch)
tree60aec489380874f107c063c6d507b31749009d80
parentf98840531a8da37e481a838971abd9ab4ee69eb9 (diff)
Fix the trunc(load) case, finally allowing crafty and povray to pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23718 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/SelectionDAG/DAGCombiner.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 0a35939ff8..4e058640ff 100644
--- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -462,6 +462,7 @@ SDOperand DAGCombiner::visitTokenFactor(SDNode *N) {
if (N->getOperand(1).getOpcode() == ISD::EntryToken)
return N->getOperand(0);
}
+
// fold (tokenfactor (tokenfactor)) -> tokenfactor
for (unsigned i = 0, e = N->getNumOperands(); i != e; ++i) {
SDOperand Op = N->getOperand(i);
@@ -1386,8 +1387,8 @@ SDOperand DAGCombiner::visitTRUNCATE(SDNode *N) {
DAG.getConstant(PtrOff, PtrType));
WorkList.push_back(NewPtr.Val);
SDOperand Load = DAG.getLoad(VT, N0.getOperand(0), NewPtr,N0.getOperand(2));
- CombineTo(N0.Val, Load, Load.getOperand(0));
WorkList.push_back(N);
+ CombineTo(N0.Val, Load, Load.getValue(1));
return SDOperand();
}
return SDOperand();