[all-commits] [llvm/llvm-project] e73784: [SLC] Allow llvm.pow(x, 2.0) -> x*x etc even if no ...

jayfoad via All-commits all-commits at lists.llvm.org
Mon May 4 02:57:56 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: e737847b8fc36b6526ad6c7ceb65d0bd07358497
      https://github.com/llvm/llvm-project/commit/e737847b8fc36b6526ad6c7ceb65d0bd07358497
  Author: Jay Foad <jay.foad at amd.com>
  Date:   2020-05-04 (Mon, 04 May 2020)

  Changed paths:
    M llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
    M llvm/test/Transforms/InstCombine/pow-1.ll
    M llvm/test/Transforms/InstCombine/pow-3.ll

  Log Message:
  -----------
  [SLC] Allow llvm.pow(x,2.0) -> x*x etc even if no pow() lib func

optimizePow does not create any new calls to pow, so it should work
regardless of whether the pow library function is available. This allows
it to optimize the llvm.pow intrinsic on targets with no math library.

Based on a patch by Tim Renouf.

Differential Revision: https://reviews.llvm.org/D68231




More information about the All-commits mailing list