[PATCH] D27028: Add intrinsics for constrained floating point operations
Andy Kaylor via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 5 17:50:15 PST 2016
andrew.w.kaylor added a comment.
In https://reviews.llvm.org/D27028#614098, @arsenm wrote:
> Correct handling of ftz is required for correctness, so it isn't appropriate to be an optimization hint placed with the fast math flags
But what's correct? The reason I think it's similar to the fast math flags is that if nothing is specified then optimizations can make no transformations based on FTZ, and if you want to be able to make a transformation that assumes a certain mode then you have to find the attribute set.
Basically, the way I've been viewing the difference between the intrinsics I'm introducing and the fast math flags is that the fast math flags are permissive (behavior is assumed to be restricted unless the attributes are present) whereas the intrinsics are restrictive (behavior is assumed to be permitted unless the constraining intrinisc is used). I'm not sure the denormal handling falls cleanly into either of these categories, but it seems to me more like the permissive approach is appropriate.
Repository:
rL LLVM
https://reviews.llvm.org/D27028
More information about the llvm-commits
mailing list