diff options
author | Duncan Sands <baldrick@free.fr> | 2008-10-20 16:04:57 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2008-10-20 16:04:57 +0000 |
commit | f6e29499ac036821e7f84e264663c24888d68c78 (patch) | |
tree | b7411d788b1dc89fc5cce58d610df66db03df272 /lib/CodeGen | |
parent | 8c8b2a89f9173aaa06e91ff43c3a46276f23b355 (diff) |
Don't use a random type for the select condition,
use an MVT::i1 and simplify the code while there.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57833 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp b/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp index 588c24e8aa..296aefc95d 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp +++ b/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); } |