// RUN: mlir-opt %s -split-input-file -verify-diagnostics --tosa-attach-target="profiles=pro_int,pro_fp extensions=int16,int4,bf16,fp8e4m3,fp8e5m2,fft,variable,controlflow,doubleround,inexactround" --tosa-validate="strict-op-spec-alignment" | FileCheck %s // ----- // CHECK-LABEL: test_cond_if_isolated_from_above func.func @test_cond_if_isolated_from_above(%arg0: tensor, %arg1: tensor, %arg2: tensor) -> tensor { %0 = "tosa.cond_if"(%arg2, %arg0, %arg1) ({ ^bb0(%arg3: tensor, %arg4: tensor): tosa.yield %arg3 : tensor }, { ^bb0(%arg3: tensor, %arg4: tensor): tosa.yield %arg4 : tensor }) : (tensor, tensor, tensor) -> tensor return %0 : tensor } // ----- // CHECK-LABEL: test_while_loop_isolated_from_above func.func @test_while_loop_isolated_from_above(%arg0: tensor, %arg1: tensor) { %0 = "tosa.const"() {values = dense<0> : tensor} : () -> tensor %1:3 = "tosa.while_loop"(%0, %arg0, %arg1) ({ ^bb0(%arg3: tensor, %arg4: tensor, %arg5: tensor): %2 = "tosa.greater_equal"(%arg3, %arg5) : (tensor, tensor) -> tensor %3 = "tosa.logical_not"(%2) : (tensor) -> tensor "tosa.yield"(%3) : (tensor) -> () }, { ^bb0(%arg3: tensor, %arg4: tensor, %arg5: tensor): %2 = "tosa.const"() {values = dense<1> : tensor} : () -> tensor %3 = "tosa.add"(%arg3, %2) : (tensor, tensor) -> tensor "tosa.yield"(%3, %arg4, %arg5) : (tensor, tensor, tensor) -> () }) : (tensor, tensor, tensor) -> (tensor, tensor, tensor) return }