1// RUN: mlir-opt %s -inline | FileCheck %s 2 3// Verifies that regions with operations from the ml_program dialect can 4// be inlined. 5 6ml_program.global private @global(dense<4> : tensor<4xi32>) : tensor<4xi32> 7 8// CHECK: @inline_into 9func.func @inline_into() -> tensor<4xi32> { 10 // CHECK-NOT: @inline_from 11 // CHECK: ml_program.global_load_const 12 %0 = call @inline_from() : () -> tensor<4xi32> 13 return %0 : tensor<4xi32> 14} 15 16func.func @inline_from() -> tensor<4xi32> { 17 %0 = ml_program.global_load_const @global : tensor<4xi32> 18 return %0 : tensor<4xi32> 19} 20