summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-12-12 22:27:43 +0000
committerChris Lattner <sabre@nondot.org>2005-12-12 22:27:43 +0000
commitb42ce7ca63f3376b4b1b7163cdc535fff85711c8 (patch)
tree917245c23e110963947a196ea8748783fd830a31 /llvm/lib/CodeGen
parent1b668bc808efd67ea7812b903c4bf5cbe757be0e (diff)
downloadbcm5719-llvm-b42ce7ca63f3376b4b1b7163cdc535fff85711c8.tar.gz
bcm5719-llvm-b42ce7ca63f3376b4b1b7163cdc535fff85711c8.zip
Fix CodeGen/Generic/2005-12-12-ExpandSextInreg.ll
llvm-svn: 24677
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index 620b6439c68..6896fb39e26 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -3196,6 +3196,16 @@ void SelectionDAGLegalize::ExpandOp(SDOperand Op, SDOperand &Lo, SDOperand &Hi){
Lo = LegalizeOp(Node->getOperand(0));
Hi = LegalizeOp(Node->getOperand(1));
break;
+
+ case ISD::SIGN_EXTEND_INREG:
+ ExpandOp(Node->getOperand(0), Lo, Hi);
+ // Sign extend the lo-part.
+ Hi = DAG.getNode(ISD::SRA, NVT, Lo,
+ DAG.getConstant(MVT::getSizeInBits(NVT)-1,
+ TLI.getShiftAmountTy()));
+ // sext_inreg the low part if needed.
+ Lo = DAG.getNode(ISD::SIGN_EXTEND_INREG, NVT, Lo, Node->getOperand(1));
+ break;
case ISD::CTPOP:
ExpandOp(Node->getOperand(0), Lo, Hi);
OpenPOWER on IntegriCloud