diff options
author | Duncan Sands <baldrick@free.fr> | 2008-10-22 09:06:24 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2008-10-22 09:06:24 +0000 |
commit | a1a388cac35e24e67876474ca16ab26dcc4d0b8e (patch) | |
tree | 396196c279f1af8dffd93ecd0a74dc545be4be3c /llvm/lib/CodeGen | |
parent | 4b6b5fcd80742e325ec6bb77f3ddf737899aea15 (diff) | |
download | bcm5719-llvm-a1a388cac35e24e67876474ca16ab26dcc4d0b8e.tar.gz bcm5719-llvm-a1a388cac35e24e67876474ca16ab26dcc4d0b8e.zip |
Add some comments explaining the meaning of a boolean
that is not of type MVT::i1 in SELECT and SETCC nodes.
Relax the LegalizeTypes SELECT condition promotion
sanity checks to allow other condition types than i1.
llvm-svn: 57966
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp index 9844d41ea9b..5ba814a11c0 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp @@ -808,8 +808,6 @@ SDValue DAGTypeLegalizer::PromoteIntOp_MEMBARRIER(SDNode *N) { SDValue DAGTypeLegalizer::PromoteIntOp_SELECT(SDNode *N, unsigned OpNo) { assert(OpNo == 0 && "Only know how to promote condition"); - assert(N->getOperand(0).getValueType() == MVT::i1 && - "SetCC type is not legal??"); SDValue Cond = GetPromotedInteger(N->getOperand(0)); // Promote all the way up to SVT, the canonical SetCC type. @@ -835,7 +833,7 @@ SDValue DAGTypeLegalizer::PromoteIntOp_SELECT(SDNode *N, unsigned OpNo) { ExtendCode = ISD::ZERO_EXTEND; if (!DAG.MaskedValueIsZero(Cond,APInt::getHighBitsSet(CondBits,CondBits-1))) // All extra bits need to be cleared. Do this by zero extending the - // original MVT::i1 condition value all the way to SVT. + // original condition value all the way to SVT. Cond = N->getOperand(0); break; case TargetLowering::ZeroOrNegativeOneSetCCResult: { @@ -843,7 +841,7 @@ SDValue DAGTypeLegalizer::PromoteIntOp_SELECT(SDNode *N, unsigned OpNo) { unsigned SignBits = DAG.ComputeNumSignBits(Cond); if (SignBits != CondBits) // All extra bits need to be sign extended. Do this by sign extending the - // original MVT::i1 condition value all the way to SVT. + // original condition value all the way to SVT. Cond = N->getOperand(0); break; } |