summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-03-21 19:20:37 +0000
committerChris Lattner <sabre@nondot.org>2006-03-21 19:20:37 +0000
commit672a42d731eba4dead0b6300efb5b2c62255948a (patch)
tree7b866ae965a21adeb98d1a943e5be39d2ba06c09 /llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
parent013127981adaf7e88a62bde4c3a5709c9ebdff0e (diff)
downloadbcm5719-llvm-672a42d731eba4dead0b6300efb5b2c62255948a.tar.gz
bcm5719-llvm-672a42d731eba4dead0b6300efb5b2c62255948a.zip
Add a hacky workaround for crashes due to vectors live across blocks.
Note that this code won't work for vectors that aren't legal on the target. Improvements coming. llvm-svn: 26925
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index a0ce3fb756e..8bf499eb7b5 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -1086,7 +1086,8 @@ SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT,
break;
case ISD::BIT_CONVERT:
// Basic sanity checking.
- assert(MVT::getSizeInBits(VT) == MVT::getSizeInBits(Operand.getValueType())
+ assert((Operand.getValueType() == MVT::Vector || // FIXME: This is a hack.
+ MVT::getSizeInBits(VT) == MVT::getSizeInBits(Operand.getValueType()))
&& "Cannot BIT_CONVERT between two different types!");
if (VT == Operand.getValueType()) return Operand; // noop conversion.
if (OpOpcode == ISD::BIT_CONVERT) // bitconv(bitconv(x)) -> bitconv(x)
OpenPOWER on IntegriCloud