aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-04-27 02:00:55 +0000
committerDan Gohman <gohman@apple.com>2009-04-27 02:00:55 +0000
commitc7b3444095f9aa5398d134c780e327a187cda231 (patch)
tree4a1567e3145693dd2b1e2b880daf266b8f7b4231 /lib/CodeGen
parentd6c329532bed7a60f760b3a009b3582c624bc270 (diff)
downloadexternal_llvm-c7b3444095f9aa5398d134c780e327a187cda231.zip
external_llvm-c7b3444095f9aa5398d134c780e327a187cda231.tar.gz
external_llvm-c7b3444095f9aa5398d134c780e327a187cda231.tar.bz2
When transforming sext(trunc(load(x))) into sext(smaller load(x)),
the trunc is directly replaced with the smaller load, so don't try to create a new sext node. This fixes PR4050. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70179 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/SelectionDAG/DAGCombiner.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index b937eaf..bd4b10e 100644
--- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -2962,7 +2962,7 @@ SDValue DAGCombiner::visitSIGN_EXTEND(SDNode *N) {
if (NarrowLoad.getNode()) {
if (NarrowLoad.getNode() != N0.getNode())
CombineTo(N0.getNode(), NarrowLoad);
- return DAG.getNode(ISD::SIGN_EXTEND, N->getDebugLoc(), VT, NarrowLoad);
+ return SDValue(N, 0); // Return N so it doesn't get rechecked!
}
// See if the value being truncated is already sign extended. If so, just