1// RUN: mlir-opt -allow-unregistered-dialect -test-strict-pattern-driver %s | FileCheck %s 2 3// CHECK-LABEL: @test_erase 4func.func @test_erase() { 5 %0 = "test.arg0"() : () -> (i32) 6 %1 = "test.arg1"() : () -> (i32) 7 %erase = "test.erase_op"(%0, %1) : (i32, i32) -> (i32) 8 return 9} 10 11// CHECK-LABEL: @test_insert_same_op 12func.func @test_insert_same_op() { 13 %0 = "test.insert_same_op"() : () -> (i32) 14 return 15} 16 17// CHECK-LABEL: @test_replace_with_same_op 18func.func @test_replace_with_same_op() { 19 %0 = "test.replace_with_same_op"() : () -> (i32) 20 %1 = "test.dummy_user"(%0) : (i32) -> (i32) 21 %2 = "test.dummy_user"(%0) : (i32) -> (i32) 22 return 23} 24