brintos

brintos / llvm-project-archived public Read only

0
0
Text · 613 B · 6e402d5 Raw
17 lines · plain
1// RUN: mlir-opt %s -one-shot-bufferize=allow-return-allocs-from-loops -split-input-file | FileCheck %s --dump-input=always2 3// A regression test to check that different before and after argument types are4// bufferized successfully.5func.func @different_before_after_args() -> tensor<f32> {6  %true = arith.constant true7  %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 : i113  }14  return %0 : tensor<f32>15}16 17// CHECK-LABEL: @different_before_after_args