aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG
diff options
context:
space:
mode:
authorPete Cooper <peter_cooper@apple.com>2012-09-01 17:37:55 +0000
committerPete Cooper <peter_cooper@apple.com>2012-09-01 17:37:55 +0000
commit0fc44aba18ed2f557805ce84fe597356f026f202 (patch)
treec19bf199eb1917df86ede936cbc7a40c22688a45 /lib/CodeGen/SelectionDAG
parent8fccd013d87c4b12edb4c9982fd9f3517917d2f7 (diff)
Revert "Take account of boolean vector contents when promoting a build vector from i1 to some other type. rdar://problem/12210060"
This reverts commit 5dd9e214fb92847e947f9edab170f9b4e52b908f. Thanks to Duncan for explaining how this should have been done. Conflicts: test/CodeGen/X86/vec_select.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163064 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG')
-rw-r--r--lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp18
1 files changed, 1 insertions, 17 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp b/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
index cd93a511b6..e8e968aaef 100644
--- a/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
+++ b/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
@@ -2913,24 +2913,8 @@ SDValue DAGTypeLegalizer::PromoteIntRes_BUILD_VECTOR(SDNode *N) {
SmallVector<SDValue, 8> Ops;
Ops.reserve(NumElems);
- unsigned ExtendOp = ISD::ANY_EXTEND;
- // Extending boolean constants needs to consider the
- // value boolean vector constants take on this target and extend
- // with sign or zeros appropriately.
- if (OutVT.getVectorElementType() == MVT::i1) {
- switch (TLI.getBooleanContents(true)) {
- case TargetLowering::UndefinedBooleanContent:
- break;
- case TargetLowering::ZeroOrOneBooleanContent:
- ExtendOp = ISD::ZERO_EXTEND;
- break;
- case TargetLowering::ZeroOrNegativeOneBooleanContent:
- ExtendOp = ISD::SIGN_EXTEND;
- break;
- }
- }
for (unsigned i = 0; i != NumElems; ++i) {
- SDValue Op = DAG.getNode(ExtendOp, dl, NOutVTElem, N->getOperand(i));
+ SDValue Op = DAG.getNode(ISD::ANY_EXTEND, dl, NOutVTElem, N->getOperand(i));
Ops.push_back(Op);
}