commit | ea00b499c703bbdbf4c87573cf2fe5b46a0bf1c2 | [log] [tgz] |
---|---|---|
author | Matt Arsenault <Matthew.Arsenault@amd.com> | Wed Mar 23 23:51:45 2016 +0000 |
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | Wed Mar 23 23:51:45 2016 +0000 |
tree | 662608e8cdefe69d39b0620f5c3690add0796c0b | |
parent | cbfe7bb72e6de9db72bbcbe8c697bf3b7627e18d [diff] [blame] |
APFloat: Fix signalling nans for scalbn llvm-svn: 264219
diff --git a/llvm/lib/Support/APFloat.cpp b/llvm/lib/Support/APFloat.cpp index ada392c..a8e14d6 100644 --- a/llvm/lib/Support/APFloat.cpp +++ b/llvm/lib/Support/APFloat.cpp
@@ -3984,6 +3984,8 @@ // Clamp to one past the range ends to let normalize handle overlflow. X.exponent += std::min(std::max(Exp, -MaxIncrement - 1), MaxIncrement); X.normalize(RoundingMode, lfExactlyZero); + if (X.isNaN()) + X.makeQuiet(); return X; }