git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220063
91177308-0d34-0410-b5e6-
96231b3b80d8
Src0->ChangeToImmediate(MovSrc.getImm());
ConstantFolded = true;
} else if (MovSrc.isFPImm()) {
- const APFloat &APF = MovSrc.getFPImm()->getValueAPF();
- if (&APF.getSemantics() == &APFloat::IEEEsingle) {
- MRI.removeRegOperandFromUseList(Src0);
- Src0->ChangeToImmediate(APF.bitcastToAPInt().getZExtValue());
+ const ConstantFP *CFP = MovSrc.getFPImm();
+ if (&CFP->getValueAPF().getSemantics() == &APFloat::IEEEsingle) {
+ Src0->ChangeToFPImmediate(CFP);
ConstantFolded = true;
}
}