diff options
| author | Nadav Rotem <nrotem@apple.com> | 2013-03-07 06:34:49 +0000 |
|---|---|---|
| committer | Nadav Rotem <nrotem@apple.com> | 2013-03-07 06:34:49 +0000 |
| commit | 40cda80af86233cbed5bc3e31a50f57f9f954d63 (patch) | |
| tree | 60a8c771bdf8481c0bf544aa8d66c7168e567cbb /llvm/lib | |
| parent | 48a91abc103d6bd80f3d30d7eaec0d03a25c43ac (diff) | |
| download | bcm5719-llvm-40cda80af86233cbed5bc3e31a50f57f9f954d63.tar.gz bcm5719-llvm-40cda80af86233cbed5bc3e31a50f57f9f954d63.zip | |
No need to go through int64 and APInt when generating a new constant.
llvm-svn: 176615
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 1801300fc6b..14280d69412 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -2607,11 +2607,11 @@ SelectCodeCommon(SDNode *NodeToMatch, const unsigned char *MatcherTable, SDValue Imm = RecordedNodes[RecNo].first; if (Imm->getOpcode() == ISD::Constant) { - int64_t Val = cast<ConstantSDNode>(Imm)->getZExtValue(); - Imm = CurDAG->getTargetConstant(Val, Imm.getValueType()); + const ConstantInt *Val=cast<ConstantSDNode>(Imm)->getConstantIntValue(); + Imm = CurDAG->getConstant(*Val, Imm.getValueType(), true); } else if (Imm->getOpcode() == ISD::ConstantFP) { const ConstantFP *Val=cast<ConstantFPSDNode>(Imm)->getConstantFPValue(); - Imm = CurDAG->getTargetConstantFP(*Val, Imm.getValueType()); + Imm = CurDAG->getConstantFP(*Val, Imm.getValueType(), true); } RecordedNodes.push_back(std::make_pair(Imm, RecordedNodes[RecNo].second)); |

