mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-10-03 08:55:51 +00:00
Don't modify constant in-place.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140875 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
62e0590c0e
commit
68e05fb368
@ -2839,10 +2839,11 @@ Instruction *InstCombiner::visitFCmpInst(FCmpInst &I) {
|
|||||||
|
|
||||||
// Avoid lossy conversions and denormals. Zero is a special case
|
// Avoid lossy conversions and denormals. Zero is a special case
|
||||||
// that's OK to convert.
|
// that's OK to convert.
|
||||||
F.clearSign();
|
APFloat Fabs = F;
|
||||||
|
Fabs.clearSign();
|
||||||
if (!Lossy &&
|
if (!Lossy &&
|
||||||
((F.compare(APFloat::getSmallestNormalized(*Sem)) !=
|
((Fabs.compare(APFloat::getSmallestNormalized(*Sem)) !=
|
||||||
APFloat::cmpLessThan) || F.isZero()))
|
APFloat::cmpLessThan) || Fabs.isZero()))
|
||||||
|
|
||||||
return new FCmpInst(I.getPredicate(), LHSExt->getOperand(0),
|
return new FCmpInst(I.getPredicate(), LHSExt->getOperand(0),
|
||||||
ConstantFP::get(RHSC->getContext(), F));
|
ConstantFP::get(RHSC->getContext(), F));
|
||||||
|
Loading…
Reference in New Issue
Block a user