diff options
| author | Dan Gohman <gohman@apple.com> | 2009-04-27 02:00:55 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2009-04-27 02:00:55 +0000 |
| commit | be36f5ccda338e6afb24310d319bdc8671cece6f (patch) | |
| tree | debd33e87f76c33f9079c9572db8010a6efdf931 /llvm/lib | |
| parent | 669e32f8c0d1f123b4748d9c7cb7e212fe4d8202 (diff) | |
| download | bcm5719-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.cpp | 2 |
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 |

