[Openmp-commits] [PATCH] D80897: [OpenMP] Initial support for std::complex in target regions

Johannes Doerfert via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Jun 2 15:23:34 PDT 2020

jdoerfert marked an inline comment as done.
jdoerfert added a comment.

I tried to determine why we don't emit such calls for c++11 and stdc++ but I was not successful :( Tracking back from the emission lead to the generic expression codegen without any (obvious) check of the runtime library or std versions.

Comment at: clang/lib/Headers/__clang_cuda_complex_builtins.h:136-137
+      __d = _COPYSIGNf(_ISINFf(__d) ? 1 : 0, __d);
+      if (_ISNANf(__a))
+        __a = _COPYSIGNf(0, __a);
+      if (_ISNANf(__b))
arsenm wrote:
> Why does this try to preserve the sign of a nan? They are meaningless
Idk [I only work here... ;)]

I guess the algorithm was once copied from libc++, unclear if the one in there is still the same, we could check.

  rG LLVM Github Monorepo



More information about the Openmp-commits mailing list