1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02: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.

llvm-svn: 57224
This commit is contained in:
Dale Johannesen 2008-10-07 00:40:01 +00:00
parent 188af3ae0d
commit 3b86d974bc

View File

@ -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();