summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2010-11-18 21:16:28 +0000
committerDuncan Sands <baldrick@free.fr>2010-11-18 21:16:28 +0000
commitc92331b9849845e64140ecbd0508e8db6c3dc1e1 (patch)
treebecae5301cc3e5f1af217831efae9bba58fbb807 /llvm/lib/CodeGen/SelectionDAG
parent7d47133ff7c025d63213fbc68237b72291b1fd49 (diff)
downloadbcm5719-llvm-c92331b9849845e64140ecbd0508e8db6c3dc1e1.tar.gz
bcm5719-llvm-c92331b9849845e64140ecbd0508e8db6c3dc1e1.zip
Fix thinko: we must turn select(anyext, sext) into sext(select)
not anyext(select). Spotted by Frits van Bommel. llvm-svn: 119739
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 53b449309c7..d7057049867 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -6712,7 +6712,8 @@ bool DAGCombiner::SimplifySelectOps(SDNode *TheSelect, SDValue LHS,
LLD->isVolatile(), LLD->isNonTemporal(),
LLD->getAlignment());
} else {
- Load = DAG.getExtLoad(LLD->getExtensionType(),
+ Load = DAG.getExtLoad(LLD->getExtensionType() == ISD::EXTLOAD ?
+ RLD->getExtensionType() : LLD->getExtensionType(),
TheSelect->getValueType(0),
TheSelect->getDebugLoc(),
// FIXME: Discards pointer info.
OpenPOWER on IntegriCloud