[llvm] r325965 - [InstSimplify] sqrt(X) * sqrt(X) --> X

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 24 00:14:26 PST 2018



> On Feb 23, 2018, at 23:20, Sanjay Patel via llvm-commits <llvm-commits at lists.llvm.org> wrote:
> 
> +  if (FMF.isFast() && Op0 == Op1 &&
> +      match(Op0, m_Intrinsic<Intrinsic::sqrt>(m_Value(X))))
> +    return X;
> +

Isn’t this too strong? Shouldn’t this just be allowReassoc?

-Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180224/2d929b14/attachment.html>


More information about the llvm-commits mailing list