[PATCH] D85709: [InstSimplify] Implement Instruction simplification for X/sqrt(X) to sqrt(X).

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 11 07:24:29 PDT 2020


spatel added a comment.

In D85709#2209206 <https://reviews.llvm.org/D85709#2209206>, @grandinj wrote:

> Just a drive-by comment : Possibly the more general form of this needs to be optimised too?
>
> The more general form of this is
>
>   X^a * X^b -> X ^ (a+b)
>   
>   X^a / X^b -> X ^ (a-b)

Do you expect the more general form to use the pow intrinsic? It would be good to file a bugzilla with examples of how this looks in source/IR, so we know that we are matching the expected patterns. I think that will have to be handled independently from the sqrt special-case.


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

https://reviews.llvm.org/D85709



More information about the llvm-commits mailing list