32 lines · plain
1// RUN: mlir-opt %s -generate-runtime-verification \2// RUN: -one-shot-bufferize="bufferize-function-boundaries" \3// RUN: -buffer-deallocation-pipeline=private-function-dynamic-ownership \4// RUN: -test-cf-assert \5// RUN: -convert-to-llvm | \6// RUN: mlir-runner -e main -entry-point-result=void \7// RUN: -shared-libs=%tlir_runner_utils 2>&1 | \8// RUN: FileCheck %s9 10// RUN: mlir-opt %s -generate-runtime-verification \11// RUN: -one-shot-bufferize="bufferize-function-boundaries" \12// RUN: -buffer-deallocation-pipeline=private-function-dynamic-ownership \13// RUN: -test-cf-assert \14// RUN: -convert-to-llvm="allow-pattern-rollback=0" \15// RUN: -reconcile-unrealized-casts | \16// RUN: mlir-runner -e main -entry-point-result=void \17// RUN: -shared-libs=%tlir_runner_utils 2>&1 | \18// RUN: FileCheck %s19 20func.func @main() {21 %c4 = arith.constant 4 : index22 %tensor = tensor.empty() : tensor<1xf32>23 24 // CHECK: ERROR: Runtime op verification failed25 // CHECK-NEXT: tensor.dim %{{.*}}, %{{.*}} : tensor<1xf32>26 // CHECK-NEXT: ^ index is out of bounds27 // CHECK-NEXT: Location: loc({{.*}})28 %dim = tensor.dim %tensor, %c4 : tensor<1xf32>29 30 return31}32