From: Chris Lattner Date: Fri, 9 Dec 2005 17:32:47 +0000 (+0000) Subject: Teach legalize how to promote sext_inreg to fix a problem Andrew pointed X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5e3c5b4e13d45d631cddf42176b380f64fde918f;p=oota-llvm.git Teach legalize how to promote sext_inreg to fix a problem Andrew pointed out to me. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24644 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index 41ba14205da..c66748729db 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -2404,6 +2404,11 @@ SDOperand SelectionDAGLegalize::PromoteOp(SDOperand Op) { } break; + case ISD::SIGN_EXTEND_INREG: + Result = PromoteOp(Node->getOperand(0)); + Result = DAG.getNode(ISD::SIGN_EXTEND_INREG, NVT, Result, + Node->getOperand(1)); + break; case ISD::FP_TO_SINT: case ISD::FP_TO_UINT: switch (getTypeAction(Node->getOperand(0).getValueType())) {