brintos

brintos / llvm-project-archived public Read only

0
0
Text · 996 B · 8f5a2c7 Raw
30 lines · plain
1// RUN: mlir-opt %s -generate-runtime-verification \2// RUN:     -expand-strided-metadata \3// RUN:     -test-cf-assert \4// RUN:     -convert-to-llvm | \5// RUN: mlir-runner -e main -entry-point-result=void \6// RUN:     -shared-libs=%mlir_runner_utils 2>&1 | \7// RUN: FileCheck %s8 9// RUN: mlir-opt %s -generate-runtime-verification \10// RUN:     -expand-strided-metadata \11// RUN:     -test-cf-assert \12// RUN:     -convert-to-llvm="allow-pattern-rollback=0" \13// RUN:     -reconcile-unrealized-casts | \14// RUN: mlir-runner -e main -entry-point-result=void \15// RUN:     -shared-libs=%mlir_runner_utils 2>&1 | \16// RUN: FileCheck %s17 18func.func @main() {19  %c4 = arith.constant 4 : index20  %alloca = memref.alloca() : memref<1xf32>21 22  //      CHECK: ERROR: Runtime op verification failed23  // CHECK-NEXT: memref.dim %{{.*}}, %{{.*}} : memref<1xf32> 24  // CHECK-NEXT: ^ index is out of bounds25  // CHECK-NEXT: Location: loc({{.*}})26  %dim = memref.dim %alloca, %c4 : memref<1xf32>27 28  return29}30