projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
abf0c6c
)
APFloat: Simplify makeSmallestNormalized implementation
author
Matt Arsenault
<Matthew.Arsenault@amd.com>
Thu, 1 Dec 2022 14:42:20 +0000
(09:42 -0500)
committer
Matt Arsenault
<Matthew.Arsenault@amd.com>
Fri, 2 Dec 2022 23:47:43 +0000
(18:47 -0500)
llvm/lib/Support/APFloat.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Support/APFloat.cpp
b/llvm/lib/Support/APFloat.cpp
index
22dd40c
..
00e863a
100644
(file)
--- a/
llvm/lib/Support/APFloat.cpp
+++ b/
llvm/lib/Support/APFloat.cpp
@@
-3900,8
+3900,7
@@
void IEEEFloat::makeSmallestNormalized(bool Negative) {
zeroSignificand();
sign = Negative;
exponent = semantics->minExponent;
- significandParts()[partCountForBits(semantics->precision) - 1] |=
- (((integerPart)1) << ((semantics->precision - 1) % integerPartWidth));
+ APInt::tcSetBit(significandParts(), semantics->precision - 1);
}
IEEEFloat::IEEEFloat(const fltSemantics &Sem, const APInt &API) {