[PATCH] D83473: libclc: Fix FP_ILOGBNAN definition
Jan Vesely via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 9 20:27:02 PDT 2020
jvesely added a comment.
What is the problem this patch is trying to address?
The specs do not mandate these two values to be different.
On the more practical side.
This patch only changes fp32 implementation to return the new value leaving the fp64 implementation to return `INT_MIN` in both cases.
The implementation now returns `FP_ILOGBNAN` even for `Inf` input, which is not correct.
CLC spec doesn't talk about `Inf` inputs, but the libm behaviour is to return `INT_MAX, which might be useful.
If `FP_ILOGBNAN` and `FP_ILOGB0` need to be different it'd be better to use `FP_ILOGBNAN == INT_MIN` and `FP_ILOGB0 == -INT_MAX`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83473/new/
https://reviews.llvm.org/D83473
More information about the llvm-commits
mailing list