summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2008-10-20 16:04:57 +0000
committerDuncan Sands <baldrick@free.fr>2008-10-20 16:04:57 +0000
commit3ed8b29acec3513d9338529c95e6cb3e4feb6b38 (patch)
treea4ea665af361ffcfd7cf0d2afbb0a486297a0a3f /llvm/lib/CodeGen
parentafed8590f013f68abe1515735a21705b296c9b94 (diff)
downloadbcm5719-llvm-3ed8b29acec3513d9338529c95e6cb3e4feb6b38.tar.gz
bcm5719-llvm-3ed8b29acec3513d9338529c95e6cb3e4feb6b38.zip
Don't use a random type for the select condition,
use an MVT::i1 and simplify the code while there. llvm-svn: 57833
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
index 588c24e8aa7..296aefc95d7 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
@@ -272,8 +272,7 @@ SDValue DAGTypeLegalizer::PromoteIntRes_EXTRACT_VECTOR_ELT(SDNode *N) {
if (TLI.isBigEndian())
std::swap(Lo, Hi);
- SDValue Odd = DAG.getNode(ISD::AND, OldIdx.getValueType(), OldIdx,
- DAG.getConstant(1, TLI.getShiftAmountTy()));
+ SDValue Odd = DAG.getNode(ISD::TRUNCATE, MVT::i1, OldIdx);
return DAG.getNode(ISD::SELECT, NewVT, Odd, Hi, Lo);
}
OpenPOWER on IntegriCloud