projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8c8b2a8
)
Don't use a random type for the select condition,
author
Duncan Sands
<baldrick@free.fr>
Mon, 20 Oct 2008 16:04:57 +0000
(16:04 +0000)
committer
Duncan Sands
<baldrick@free.fr>
Mon, 20 Oct 2008 16:04:57 +0000
(16:04 +0000)
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
lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
patch
|
blob
|
history
diff --git
a/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
b/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
index 588c24e8aa7bd5db9d855a432a1e1d12563f18ce..296aefc95d7e741138b5d7fd0f7520dc39677d4a 100644
(file)
--- 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);
}