[mlir] return nullopt for getNeutralElement
authorXiang <python3kgae@outlook.com>
Tue, 31 Jan 2023 01:38:57 +0000 (20:38 -0500)
committerXiang <python3kgae@outlook.com>
Wed, 1 Feb 2023 05:47:01 +0000 (00:47 -0500)
commite1af75572d3a0789cf91bf06869cec69a2741b85
tree93b8b63136b72ea6d74944c1533f94c111048551
parentc4e38fadfa2a615467a8c9071f12edc4cdce5eb8
[mlir] return nullopt for getNeutralElement

Fixes 60210  https://github.com/llvm/llvm-project/issues/60210

Crash for return Attribute instead of nullopt.

Differential Revision: https://reviews.llvm.org/D142945
mlir/lib/Dialect/Linalg/Utils/Utils.cpp
mlir/test/Dialect/Linalg/transform-tile-reduction.mlir