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

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 7 05:37:57 PDT 2020


spatel added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp:1688-1689
   // pow(1.0, x) -> 1.0
   if (match(Base, m_FPOne()))
     return Base;
 
----------------
There's no way for Base to be 1.0 after here, so we can use an assert rather than 'if' clause in the new code.


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