[mlir][arith][spirv] Hard fail in `-convert-arith-to-spirv`
authorJakub Kuderski <kubak@google.com>
Mon, 31 Oct 2022 21:00:45 +0000 (17:00 -0400)
committerJakub Kuderski <kubak@google.com>
Mon, 31 Oct 2022 21:01:21 +0000 (17:01 -0400)
commit179978d7b8ec00291401d2ec49fc0a55e7f7bfb3
treecf30ba3cbb2f3255492f9e905d33f5b4ca959082
parentd4c8a0edca51d83b084291960eea6664b9f56327
[mlir][arith][spirv] Hard fail in `-convert-arith-to-spirv`

Turn legalization failures into hard failures to make sure that we do
not miss conversion pattern application failures.

Add a message on type conversion failure.

Move unsupported cases into a separate test file.

Reviewed By: antiagainst

Differential Revision: https://reviews.llvm.org/D137102
mlir/lib/Conversion/ArithToSPIRV/ArithToSPIRV.cpp
mlir/lib/Conversion/SPIRVCommon/Pattern.h
mlir/test/Conversion/ArithToSPIRV/arith-to-spirv-unsupported.mlir [new file with mode: 0644]
mlir/test/Conversion/ArithToSPIRV/arith-to-spirv.mlir