[llvm] [FPEnv] Add strictfp attribute to the FP environment manipulation intrinsics (PR #96093)
Kevin P. Neal via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 12 11:43:56 PDT 2024
kpneal wrote:
> > Maybe we need two attributes, one meaning "this function must be implemented using strictfp operations" and another meaning "The code that calls this function must use strictfp operations"?
>
> I think we need an attribute similar to the memory attribute which covers which aspects of the floating-point environment are read/written.
I'm not sure I see how this is useful. If a strictfp function can safely be called from a non-strictfp function then the caller doesn't need to know these details. And if the caller is non-strictfp then it isn't supposed to know about the -754 FP environment anyway since we assume -754's default environment. If it's strictfp calling strictfp then we rely on the metadata arguments to the constrained intrinsics being correct.
https://github.com/llvm/llvm-project/pull/96093
More information about the llvm-commits
mailing list