[PATCH] D79409: [InstCombine] Remove hasNoInfs check for pow(C, y) -> exp2(log2(C)*y)

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 6 13:35:58 PDT 2020


foad added a comment.

In D79409#2023511 <https://reviews.llvm.org/D79409#2023511>, @evandro wrote:

> `pow(∞, y)` → 0 if `y < 0` or ∞ if `y > 0`
>  `exp2(log2(∞) * y)` → `exp2(∞ * y)`  → `exp2(∞)` → 0 if `y < 0` or ∞ if `y > 0`


We check that x is a finite constant before doing the transformation. It's only y that could be infinite.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79409





More information about the llvm-commits mailing list