[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
Thu May 7 02:15:07 PDT 2020


foad added a comment.

Thanks for the careful checking. Actually there is one problematic case:
`pow(1, ±∞)` → `1`
`exp2(log2(1) * ±∞)` → `exp2(0 * ±∞)` → `exp2(NaN)` → `NaN`
I guess we never hit this case in practice because it will have been simplified elsewhere, but I will add something to the patch to handle it.


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