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