[all-commits] [llvm/llvm-project] 22702c: [mlir][math] Added math::FPowI conversion to calls...

Slava Zakharin via All-commits all-commits at lists.llvm.org
Tue Dec 13 12:15:52 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 22702cc76c4d6fcd3ee0e37ca826c539af146494
      https://github.com/llvm/llvm-project/commit/22702cc76c4d6fcd3ee0e37ca826c539af146494
  Author: Slava Zakharin <szakharin at nvidia.com>
  Date:   2022-12-13 (Tue, 13 Dec 2022)

  Changed paths:
    M flang/lib/Optimizer/CodeGen/CodeGen.cpp
    M mlir/include/mlir/Conversion/MathToFuncs/MathToFuncs.h
    M mlir/include/mlir/Conversion/Passes.td
    M mlir/lib/Conversion/MathToFuncs/MathToFuncs.cpp
    A mlir/test/Conversion/MathToFuncs/fpowi.mlir
    A mlir/test/Conversion/MathToFuncs/ipowi.mlir
    R mlir/test/Conversion/MathToFuncs/math-to-funcs.mlir

  Log Message:
  -----------
  [mlir][math] Added math::FPowI conversion to calls of outlined implementations.

Power functions are implemented as linkonce_odr scalar functions
for FPowI operations met in a module.
Vector form of FPowI is linearized into a sequence of calls
of the scalar functions.

Option {min-width-of-fpowi-exponent} controls which FPowI operations
are converted by MathToFuncs: if the width of the exponent's integer
type is less than the specified value, then the operation is not converted.

Flang will specify {min-width-of-fpowi-exponent=33} to make sure that
math::FPowI operations with exponent wider than 32 bits will be converted
by MathToFuncs, and operations with more narrow exponent will be left
for MathToLLVM to convert them to LLVM::PowIOp.

Reviewed By: Mogball

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




More information about the All-commits mailing list