From 5e3c5b4e13d45d631cddf42176b380f64fde918f Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 9 Dec 2005 17:32:47 +0000 Subject: [PATCH] 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 --- lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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())) { -- 2.34.1