[flang-commits] [flang] [flang] Fixed ieee_logb to behave for denormals. (PR #83518)

Slava Zakharin via flang-commits flang-commits at lists.llvm.org
Thu Feb 29 20:40:23 PST 2024


vzakhari wrote:

FYI, the issue was triggered by a test because we return `0x0000200000000000...` for 128-bit FP `IEEE_POSITIVE_SUBNORMAL`.  The result of the old code would be correct for `0x0000800000000000...` subnormal, and this is the value that gfortran uses.  I did not find any standard requirements to return one subnormal or another, so I thought fixing `IEEE_LOGB` would be the right thing.  I guess a user code may trigger incorrect behavior with the old code by using `TRANSFER` to generate different subnormals.

https://github.com/llvm/llvm-project/pull/83518


More information about the flang-commits mailing list