aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-10-13 21:52:31 +0000
committerChris Lattner <sabre@nondot.org>2005-10-13 21:52:31 +0000
commitf98840531a8da37e481a838971abd9ab4ee69eb9 (patch)
tree2d5b0f46745e17425c09df6728c8309bb03c3f02 /lib/CodeGen/SelectionDAG/DAGCombiner.cpp
parent9ad8481cfbbb9dfe451b771978098677bc8dd254 (diff)
Fix some bugs in (sext (load x))
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23717 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-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 61b377de92..0a35939ff8 100644
--- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -1248,8 +1248,9 @@ SDOperand DAGCombiner::visitSIGN_EXTEND(SDNode *N) {
SDOperand ExtLoad = DAG.getExtLoad(ISD::SEXTLOAD, VT, N0.getOperand(0),
N0.getOperand(1), N0.getOperand(2),
N0.getValueType());
- CombineTo(N0.Val, ExtLoad, ExtLoad.getOperand(0));
WorkList.push_back(N);
+ CombineTo(N0.Val, DAG.getNode(ISD::TRUNCATE, N0.getValueType(), ExtLoad),
+ ExtLoad.getValue(1));
return SDOperand();
}
return SDOperand();