Does #pragma FENV_ACCESS apply to cpu-specific builtins?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Does #pragma FENV_ACCESS apply to cpu-specific builtins?

Yvan Roux via cfe-dev
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?
 
--
Kevin P. Neal
SAS/C and SAS/C++ Compiler
Host Research and Development
SAS Institute, Inc.
 
 
 
 

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Does #pragma FENV_ACCESS apply to cpu-specific builtins?

Yvan Roux via cfe-dev

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
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

-- 
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev