11 lines · plain
1// RUN: mlir-opt %s -test-legalize-unknown-root-patterns -verify-diagnostics2 3// Test that an error is emitted when an operation is marked as "erased", but4// has users that live across the conversion.5func.func @remove_all_ops(%arg0: i32) -> i32 {6 // expected-error@below {{failed to legalize unresolved materialization from () to ('i32') that remained live after conversion}}7 %0 = "test.illegal_op_a"() : () -> i328 // expected-note@below {{see existing live user here}}9 return %0 : i3210}11