diff options
author | Duncan Sands <baldrick@free.fr> | 2010-11-18 21:16:28 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2010-11-18 21:16:28 +0000 |
commit | b9064bb96458ab48a878e1a7e678cada2e22ab7a (patch) | |
tree | e971c7050f045ae623ce65d3921a777644410d45 | |
parent | d5448bb6e845bd6c2dcb98156f49a73842759ab0 (diff) |
Fix thinko: we must turn select(anyext, sext) into sext(select)
not anyext(select). Spotted by Frits van Bommel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119739 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 53b449309c..d705704986 100644 --- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/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. |