Linalg.pad_tensor's output type and pad size

Hello all,

If the output type of linalg.pad_tensor has static sizes whereas the input pad sizes are variables, does it imply that the pad sizes not being the constant value UB?

Specifically, I’m interested in this function in mlir/test/Dialect/Linalg/canonicalize.mlir:

func @pad_tensor_same_static_shape(%arg0: tensor<5x6xf32>, %a: index)
    -> tensor<5x6xf32> {
  %cst = arith.constant 0.000000e+00 : f32 
  %0 = linalg.pad_tensor %arg0 low[%a, 0] high[0, %a] {
        ^bb0(%arg1: index, %arg2: index):
          linalg.yield %cst : f32 
  } : tensor<5x6xf32> to tensor<5x6xf32>
  return %0 : tensor<5x6xf32>
}

If %a is not 0, does it mean that this linalg.pad_tensor is UB? Or, are the excessive row/columns truncated?

Thanks,