llvm.org GIT mirror llvm / 90196fc
Fix APFloat::getSmallestNormalized so the shift doesn't depend on undefined behavior. Patch from Ahmed Charles. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141818 91177308-0d34-0410-b5e6-96231b3b80d8 Eli Friedman 8 years ago
1 changed file(s) with 1 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
32743274 Val.exponent = Sem.minExponent;
32753275 Val.zeroSignificand();
32763276 Val.significandParts()[partCountForBits(Sem.precision)-1] |=
3277 (((integerPart) 1) << ((Sem.precision % integerPartWidth) - 1));
3277 (((integerPart) 1) << ((Sem.precision - 1) % integerPartWidth));
32783278
32793279 return Val;
32803280 }