1// RUN: mlir-opt %s -one-shot-bufferize=allow-return-allocs-from-loops -split-input-file | FileCheck %s --dump-input=always 2 3// A regression test to check that different before and after argument types are 4// bufferized successfully. 5func.func @different_before_after_args() -> tensor<f32> { 6 %true = arith.constant true 7 %cst = arith.constant dense<0.0> : tensor<f32> 8 %0 = scf.while (%arg4 = %true) : (i1) -> (tensor<f32>) { 9 scf.condition(%true) %cst : tensor<f32> 10 } do { 11 ^bb0(%arg4: tensor<f32>): 12 scf.yield %true : i1 13 } 14 return %0 : tensor<f32> 15} 16 17// CHECK-LABEL: @different_before_after_args