[PATCH] D27028: Add intrinsics for constrained floating point operations

Andy Kaylor via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 22 14:09:37 PDT 2020


andrew.w.kaylor added a comment.

In D27028#1997092 <https://reviews.llvm.org/D27028#1997092>, @GGanesh wrote:

> @andrew.w.kaylor  I went through the mailing list thread regarding this change and saw "Eventually, we’ll want to go back and teach specific optimizations to understand the intrinsics so that where possible optimizations can be performed in a manner consistent with dynamic rounding modes and strict exception handling.".
>  Do you have any references\plans on how to teach specific optimizations on this?


It depends on the optimization. Each optimization needs to be evaluated in some way to determine if it is safe to perform the optimization with the floating point constraints. Simon Moll has an idea that he can update the pattern matching to also match closely related intrinsics. Simon intends to work on this for the vector predicated intrinsics, but the idea should extend to constrained floating point intrinsics. However, we will still need to update the optimizations to evaluate whether its intended transformation meets the constraints. For example, pattern matching may find opportunities for constant folding, but we will need to examine the actual constants to determine if the operation being folded would be inexact (and therefore subject to rounding) or otherwise raise an FP exception.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D27028/new/

https://reviews.llvm.org/D27028





More information about the llvm-commits mailing list