mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-17 08:36:52 +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. llvm-svn: 57224
This commit is contained in:
parent
188af3ae0d
commit
3b86d974bc
@ -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