summaryrefslogtreecommitdiffstats
path: root/llvm/lib
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
commitbe36f5ccda338e6afb24310d319bdc8671cece6f (patch)
treedebd33e87f76c33f9079c9572db8010a6efdf931 /llvm/lib
parent669e32f8c0d1f123b4748d9c7cb7e212fe4d8202 (diff)
downloadbcm5719-llvm-be36f5ccda338e6afb24310d319bdc8671cece6f.tar.gz
bcm5719-llvm-be36f5ccda338e6afb24310d319bdc8671cece6f.zip
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. llvm-svn: 70179
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index b937eaff757..bd4b10ea4e4 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/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
OpenPOWER on IntegriCloud