[MLIR][Standard] Add default lowering for `assert`
authorFrederik Gossen <frgossen@google.com>
Fri, 24 Jul 2020 08:09:12 +0000 (08:09 +0000)
committerFrederik Gossen <frgossen@google.com>
Fri, 24 Jul 2020 08:31:12 +0000 (08:31 +0000)
commitfb1e5716877c751d561dad3483af8a4a4559a0fe
treec1615cf638b2bd53bdd46aa1c3d8052a61e71f6b
parent7f003957bfcd1ed29ded176f04e3cdb55a0c0112
[MLIR][Standard] Add default lowering for `assert`

The default lowering of `assert` calls `abort` in case the assertion is
violated. The failure message is ignored but should be used by custom lowerings
that can assume more about their environment.

Differential Revision: https://reviews.llvm.org/D83886
mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
mlir/test/Conversion/StandardToLLVM/standard-to-llvm.mlir