[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Chris Lattner
lattner at cs.uiuc.edu
Mon Dec 12 14:27:55 PST 2005
Changes in directory llvm/lib/CodeGen/SelectionDAG:
LegalizeDAG.cpp updated: 1.226 -> 1.227
---
Log message:
Fix CodeGen/Generic/2005-12-12-ExpandSextInreg.ll
---
Diffs of the changes: (+10 -0)
LegalizeDAG.cpp | 10 ++++++++++
1 files changed, 10 insertions(+)
Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.226 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.227
--- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.226 Fri Dec 9 20:36:00 2005
+++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Mon Dec 12 16:27:43 2005
@@ -3196,6 +3196,16 @@
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);
More information about the llvm-commits
mailing list