mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 05:29:24 +00:00
Mark negative-zero-to-int conversion as Inexact,
since -0.0 can't be represented as an int. This prevents llvm from reducing -0.0 to a load-and-convert of int 0. Fixes ieee.exp/mzero[2356].c in gcc testsuite. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57224 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b5cc34d098
commit
e4a4245906
@ -1784,7 +1784,8 @@ APFloat::convertToSignExtendedInteger(integerPart *parts, unsigned int width,
|
||||
|
||||
if(category == fcZero) {
|
||||
APInt::tcSet(parts, 0, dstPartsCount);
|
||||
return opOK;
|
||||
// Negative zero can't be represented as an int.
|
||||
return sign ? opInexact : opOK;
|
||||
}
|
||||
|
||||
src = significandParts();
|
||||
|
Loading…
Reference in New Issue
Block a user