[mlir][tosa] Use arith::maxf/arith::minf in lowering from tosa
authorThomas Raoux <thomasraoux@google.com>
Tue, 9 Aug 2022 01:10:08 +0000 (01:10 +0000)
committerThomas Raoux <thomasraoux@google.com>
Tue, 9 Aug 2022 01:10:32 +0000 (01:10 +0000)
commit2eb50cee11ccbfac71eeb7687b9f136d95fc7f52
tree480105509f373c5645a1f7493d7c68814dc303b4
parent474145c0b2420cb316bb8a9dcc031d613679d496
[mlir][tosa] Use arith::maxf/arith::minf in lowering from tosa

now that `arith` dialect has maxf/minf use it instead of cmp/select.
Also refactor clamp helpers to make them simlper.

Reviewed By: rsuderman

Differential Revision: https://reviews.llvm.org/D131426
mlir/include/mlir/Dialect/Tosa/Utils/CoversionUtils.h
mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp
mlir/lib/Conversion/TosaToLinalg/TosaToLinalgNamed.cpp
mlir/lib/Dialect/Tosa/Utils/ConversionUtils.cpp
mlir/test/Conversion/TosaToLinalg/tosa-to-linalg.mlir