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

Evandro Menezes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 8 13:58:20 PDT 2020


evandro added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp:1570
+  //   If x is +1, the result is 1.0 (even if y is a NaN).
+  // which is hard to preserve if y might be infinite or NaN.
+  if (Pow->hasApproxFunc() && Pow->hasNoNaNs() && BaseF->isFiniteNonZero() &&
----------------
This comment makes more sense immediately before the `assert()`.  Personally, it could also be shorter.


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