[PATCH] D95948: Stop traping on sNaN in __builtin_isnan
Thomas Preud'homme via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 3 05:41:36 PST 2021
thopre created this revision.
thopre added reviewers: efriedma, kpn, mibintc, sepavloff, rjmccall.
Herald added subscribers: dexonsmith, pengfei.
thopre requested review of this revision.
Herald added projects: clang, LLVM.
Herald added a subscriber: llvm-commits.
__builtin_isnan currently generates a floating-point compare operation
which triggers a trap when faced with a signaling NaN in StrictFP mode.
This commit uses integer operations instead to not generate any trap in
such a case.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D95948
Files:
clang/lib/CodeGen/CGBuiltin.cpp
clang/test/CodeGen/X86/strictfp_builtins.c
clang/test/CodeGen/strictfp_builtins.c
clang/test/CodeGen/strictfp_fpclassify.c
llvm/include/llvm/ADT/APFloat.h
llvm/include/llvm/IR/Type.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95948.321075.patch
Type: text/x-patch
Size: 8327 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210203/50b54fe8/attachment.bin>
More information about the llvm-commits
mailing list