[PATCH] D43765: [InstSimplify] loosen FMF for sqrt(X) * sqrt(X) --> X

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 5 09:16:34 PST 2018


spatel added a comment.

In https://reviews.llvm.org/D43765#1027302, @arsenm wrote:

> In https://reviews.llvm.org/D43765#1027289, @scanon wrote:
>
> > IIRC `Intrinsic::sqrt` is undef for negative inputs (unlike the `sqrt` libcall), so we don't need `FMF.noNaNs` to license this transformation.
>
>
> Although IMO if we're fixing all of the math in LLVM I would like to fix this. At least do something like ctlz/cttz for whether negative is undef


Sqrt was fixed:
https://reviews.llvm.org/D28797


https://reviews.llvm.org/D43765





More information about the llvm-commits mailing list