From 3d47afdf5a9a129737fefeb47f4e3e334bc6af68 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Thu, 1 Dec 2022 09:42:20 -0500 Subject: [PATCH] APFloat: Simplify makeSmallestNormalized implementation --- llvm/lib/Support/APFloat.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/llvm/lib/Support/APFloat.cpp b/llvm/lib/Support/APFloat.cpp index 22dd40c..00e863a 100644 --- 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) { -- 2.7.4