[mlir][linalg] Fix neutral element value for minf/maxf
authorThomas Raoux <thomasraoux@google.com>
Fri, 4 Nov 2022 04:23:32 +0000 (04:23 +0000)
committerThomas Raoux <thomasraoux@google.com>
Fri, 4 Nov 2022 16:35:40 +0000 (16:35 +0000)
commita032b47e7e7792d57a26c0dcb38ecd12c28a0248
tree0b056ff67160325718eef426ea8d6a86c19c7fc3
parent6ace52e5e49cff6664fc301fa4985fc28c88f26f
[mlir][linalg] Fix neutral element value for minf/maxf

The neutral element got minf/maxf should be respectively +inf and -inf.

Bug reported by @Hardcode84.

Differential Revision: https://reviews.llvm.org/D137385
mlir/lib/Dialect/Linalg/Utils/Utils.cpp
mlir/test/Dialect/Linalg/transform-op-split-reduction.mlir