[cfe-dev] Does #pragma FENV_ACCESS apply to cpu-specific builtins?

Finkel, Hal J. via cfe-dev cfe-dev at lists.llvm.org
Tue Sep 25 11:52:37 PDT 2018


On 09/25/2018 12:21 PM, Kevin Neal via cfe-dev wrote:
I’m working on support for clang emitting the new experimental builtins when #pragma STDC FENV_ACCESS ON is enabled. I mostly care about C code currently.

I notice that there are calls to Builder.CreateFAdd() in some of the Neon specific builtins in CGBuiltin.cpp. Does that pragma apply to host-specific, CPU-specific, OS-specific, whatever-specific cases? What’s the rule?

I see no reason why, in theory, FENV_ACCESS would not apply to these builtins. The IR, in this case, is trying to model what actually happens on the processor, and presumably the execution of these builtins is also affected by the FP-environment that the user is modifying. If there are builtins which are not affected, because of the way that the underlying implementation functions, then that's a different story.

 -Hal


--
Kevin P. Neal
SAS/C and SAS/C++ Compiler
Host Research and Development
SAS Institute, Inc.







_______________________________________________
cfe-dev mailing list
cfe-dev at lists.llvm.org<mailto:cfe-dev at lists.llvm.org>
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev



--
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20180925/a135bdc0/attachment.html>


More information about the cfe-dev mailing list