[flang-commits] [flang] [flang] IEEE underflow control for Arm (PR #124170)
via flang-commits
flang-commits at lists.llvm.org
Fri Jan 24 09:30:05 PST 2025
vdonaldson wrote:
> Not the expert here, but code looks good to me. One question looking at [ARM doc](https://developer.arm.com/documentation/ddi0601/2024-12/AArch64-Registers/FPCR--Floating-point-Control-Register) for FPCR.FZ, does FPCR.AH also needs to be set to 0 or 1 to get the expected IEEE behavior (it looks like it impacts the flushing of fp operation inputs in the FZ doc)?
>
> FPCR.AH seems to also impacts the rounding (RMode), so maybe modifying it here is a bad idea.
Thanks @jeanPerier for looking into this. My reading is that the AH bit affects whether denormal operands are treated as zero or not, which is distinct from whether or not denormal results are flushed to zero. My interpretation of the Fortran standard is that these ieee functions apply to results, not operands, and the AH bit is not relevant here. If at some point we implement (standard-external) compilation options to control denormal operand handling, that would involve the AH bit.
https://github.com/llvm/llvm-project/pull/124170
More information about the flang-commits
mailing list