[all-commits] [llvm/llvm-project] 3d6c10: [SimplifyLibCalls] avoid converting pow() to powi(...

Sanjay Patel via All-commits all-commits at lists.llvm.org
Tue Jul 19 09:27:14 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3d6c10dcf3b5d43708adb0c175e6ff382a4e9e4c
      https://github.com/llvm/llvm-project/commit/3d6c10dcf3b5d43708adb0c175e6ff382a4e9e4c
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2022-07-19 (Tue, 19 Jul 2022)

  Changed paths:
    M llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
    M llvm/test/Transforms/InstCombine/pow_fp_int.ll
    M llvm/test/Transforms/InstCombine/pow_fp_int16.ll

  Log Message:
  -----------
  [SimplifyLibCalls] avoid converting pow() to powi() with no FMF

powi() is not a standard math library function; it is specified
with non-strict semantics in the LangRef. We currently require
'afn' to do this transform when it needs a sqrt(), so I just
extended that requirement to the whole-number exponent too.

This bug was introduced with:
b17754bcaa14
...where we deferred expansion of pow() to later passes.




More information about the All-commits mailing list