mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-03 15:36:21 +00:00
No need to go through int64 and APInt when generating a new constant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176615 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
34fd0d2b93
commit
4d895455fe
@ -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));
|
||||
|
Loading…
x
Reference in New Issue
Block a user