aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-03-24 02:20:47 +0000
committerChris Lattner <sabre@nondot.org>2006-03-24 02:20:47 +0000
commite8a30fdf519a7db1c5e157aa29d72839cfc16174 (patch)
tree50fe73de098228275aca50e234c23977a387bca2 /lib/CodeGen/SelectionDAG/SelectionDAG.cpp
parentb52a5d944dbd64070167b113b4a4813aa9fea1d9 (diff)
fix some bogus assertions: noop bitconverts are legal
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27032 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAG.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 13a262508e..97b4095fcf 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -956,13 +956,10 @@ SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT,
case ISD::SINT_TO_FP: return getConstantFP(C->getSignExtended(), VT);
case ISD::UINT_TO_FP: return getConstantFP(C->getValue(), VT);
case ISD::BIT_CONVERT:
- if (VT == MVT::f32) {
- assert(C->getValueType(0) == MVT::i32 && "Invalid bit_convert!");
+ if (VT == MVT::f32 && C->getValueType(0) == MVT::i32)
return getConstantFP(BitsToFloat(Val), VT);
- } else if (VT == MVT::f64) {
- assert(C->getValueType(0) == MVT::i64 && "Invalid bit_convert!");
+ else if (VT == MVT::f64 && C->getValueType(0) == MVT::i64)
return getConstantFP(BitsToDouble(Val), VT);
- }
break;
case ISD::BSWAP:
switch(VT) {
@@ -1035,13 +1032,10 @@ SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT,
case ISD::FP_TO_UINT:
return getConstant((uint64_t)C->getValue(), VT);
case ISD::BIT_CONVERT:
- if (VT == MVT::i32) {
- assert(C->getValueType(0) == MVT::f32 && "Invalid bit_convert!");
+ if (VT == MVT::i32 && C->getValueType(0) == MVT::f32)
return getConstant(FloatToBits(C->getValue()), VT);
- } else if (VT == MVT::i64) {
- assert(C->getValueType(0) == MVT::f64 && "Invalid bit_convert!");
+ else if (VT == MVT::i64 && C->getValueType(0) == MVT::f64)
return getConstant(DoubleToBits(C->getValue()), VT);
- }
break;
}