[PATCH] D95948: Stop traping on sNaN in __builtin_isnan

2021-02-05 Thread Thomas Preud'homme via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG00a62547da7e: Stop traping on sNaN in __builtin_isnan (authored by thopre). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https

[PATCH] D95948: Stop traping on sNaN in __builtin_isnan

2021-02-05 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn accepted this revision. kpn added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95948/new/ https://reviews.llvm.org/D95948 ___ cfe-com

[PATCH] D95948: Stop traping on sNaN in __builtin_isnan

2021-02-04 Thread Thomas Preud'homme via Phabricator via cfe-commits
thopre added inline comments. Comment at: clang/test/CodeGen/aarch64-strictfp-builtins.c:1 +// RUN: %clang_cc1 %s -emit-llvm -ffp-exception-behavior=maytrap -fexperimental-strict-floating-point -o - -triple arm64-none-linux-gnu | FileCheck %s + AArch64 is not S

[PATCH] D95948: Stop traping on sNaN in __builtin_isnan

2021-02-04 Thread Thomas Preud'homme via Phabricator via cfe-commits
thopre updated this revision to Diff 321554. thopre added a comment. Add AArch64 testcase and rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95948/new/ https://reviews.llvm.org/D95948 Files: clang/lib/CodeGen/CGBuiltin.cpp clang/test/Cod

[PATCH] D95948: Stop traping on sNaN in __builtin_isnan

2021-02-04 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added a comment. In D95948#2542884 , @mibintc wrote: > Should we add tests for mlong-double-64, -80, -128? Assuming Ty->getScalarSizeInBits() returns 64, 80, or 128 in those cases, I think it's good enough to just add an AArch64 (or some other 128-bi

[PATCH] D95948: Stop traping on sNaN in __builtin_isnan

2021-02-04 Thread Melanie Blower via Phabricator via cfe-commits
mibintc added a comment. Should we add tests for mlong-double-64, -80, -128? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95948/new/ https://reviews.llvm.org/D95948 ___ cfe-commits mailing list cfe-comm

[PATCH] D95948: Stop traping on sNaN in __builtin_isnan

2021-02-04 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added a comment. This looks like a definite step forward. Thank you! Can you do an AArch64 test case showing long double? Right now there's no 128-bit test case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95948/new/ https://reviews.llvm.or

[PATCH] D95948: Stop traping on sNaN in __builtin_isnan

2021-02-03 Thread Melanie Blower via Phabricator via cfe-commits
mibintc added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:3011 +Builder.CreateSub(llvm::ConstantInt::get(IntTy, ExpMask), AbsV); +V = Builder.CreateLShr(Sub, llvm::ConstantInt::get(IntTy, bitsize - 1)); +if (bitsize > 32) thopre w

[PATCH] D95948: Stop traping on sNaN in __builtin_isnan

2021-02-03 Thread Thomas Preud'homme via Phabricator via cfe-commits
thopre updated this revision to Diff 321107. thopre marked 2 inline comments as done. thopre added a comment. - Fix order of sub operands in comments and use fully parenthesized expression - Explain how LShr is equivalent to < 0 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D95948: Stop traping on sNaN in __builtin_isnan

2021-02-03 Thread Thomas Preud'homme via Phabricator via cfe-commits
thopre marked 2 inline comments as done. thopre added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:2995 +Builder.getDefaultConstrainedExcept() == fp::ebIgnore || +!Ty->isIEEE()) { + V = Builder.CreateFCmpUNO(V, V, "cmp"); I'm

[PATCH] D95948: Stop traping on sNaN in __builtin_isnan

2021-02-03 Thread Thomas Preud'homme via Phabricator via cfe-commits
thopre marked 2 inline comments as done. thopre added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:2988 CodeGenFunction::CGFPOptionsRAII FPOptsRAII(*this, E); -// FIXME: for strictfp/IEEE-754 we need to not trap on SNaN here. Value *V = EmitScalarExp

[PATCH] D95948: Stop traping on sNaN in __builtin_isnan

2021-02-03 Thread Melanie Blower via Phabricator via cfe-commits
mibintc added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:2988 CodeGenFunction::CGFPOptionsRAII FPOptsRAII(*this, E); -// FIXME: for strictfp/IEEE-754 we need to not trap on SNaN here. Value *V = EmitScalarExpr(E->getArg(0)); What a

[PATCH] D95948: Stop traping on sNaN in __builtin_isnan

2021-02-03 Thread Thomas Preud'homme via Phabricator via cfe-commits
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 generat