diff options
author | Chris Lattner <sabre@nondot.org> | 2007-08-25 01:00:22 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-08-25 01:00:22 +0000 |
commit | 2ed652f11db3bd96973a4c3e2f174806b5e84d7b (patch) | |
tree | a076f1c6dc6f2fa14462cc4516b47271108c5374 /llvm/lib/CodeGen | |
parent | 4e63e1f5b5ef4f3f8b73aa580080ba1f5b79463a (diff) | |
download | bcm5719-llvm-2ed652f11db3bd96973a4c3e2f174806b5e84d7b.tar.gz bcm5719-llvm-2ed652f11db3bd96973a4c3e2f174806b5e84d7b.zip |
Allow target constants to be illegal types. The target should
know how to handle them. This fixes
test/CodeGen/Generic/asm-large-immediate.ll
llvm-svn: 41388
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index e370e4a8971..8e4d09af110 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -457,6 +457,8 @@ void SelectionDAGLegalize::HandleOp(SDOperand Op) { // If this is an illegal scalar, expand it into its two component // pieces. SDOperand X, Y; + if (Op.getOpcode() == ISD::TargetConstant) + break; // Allow illegal target nodes. ExpandOp(Op, X, Y); } else if (MVT::getVectorNumElements(VT) == 1) { // If this is an illegal single element vector, convert it to a @@ -644,6 +646,9 @@ SDOperand ExpandUnalignedLoad(LoadSDNode *LD, SelectionDAG &DAG, /// is legal, recursively ensuring that the operands' operations remain /// legal. SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) { + if (Op.getOpcode() == ISD::TargetConstant) // Allow illegal target nodes. + return Op; + assert(isTypeLegal(Op.getValueType()) && "Caller should expand or promote operands that are not legal!"); SDNode *Node = Op.Val; |