[mlir][mesh] Exit after signalPassFailure to fix a crash (#132662)
Fixes #131435.
This commit is contained in:
@@ -369,7 +369,7 @@ struct ShardingPropagation
|
||||
OpBuilder builder(ctx);
|
||||
if (!region.hasOneBlock()) {
|
||||
funcOp.emitOpError() << "only one block is supported!";
|
||||
signalPassFailure();
|
||||
return signalPassFailure();
|
||||
}
|
||||
Block &block = region.front();
|
||||
|
||||
|
||||
4
mlir/test/Dialect/Mesh/sharding-propagation-failed.mlir
Normal file
4
mlir/test/Dialect/Mesh/sharding-propagation-failed.mlir
Normal file
@@ -0,0 +1,4 @@
|
||||
// RUN: mlir-opt --pass-pipeline="builtin.module(func.func(sharding-propagation))" %s -verify-diagnostics
|
||||
|
||||
// expected-error @+1 {{'func.func' op only one block is supported!}}
|
||||
func.func private @no_block_function(i64)
|
||||
Reference in New Issue
Block a user