diff --git a/mlir/test/Dialect/Vector/vector-cast-0D.mlir b/mlir/test/Dialect/Vector/vector-cast-0D.mlir deleted file mode 100644 --- a/mlir/test/Dialect/Vector/vector-cast-0D.mlir +++ /dev/null @@ -1,9 +0,0 @@ -// RUN: mlir-opt %s -test-vector-to-vector-lowering | FileCheck %s - -// Make sure not crash on 0-D vector. -// CHECK:func.func @func -// CHECK-NEXT:vector.bitcast -func.func @func(%arg0: vector) -> vector { - %0 = vector.bitcast %arg0 : vector to vector - return %0 : vector -} diff --git a/mlir/test/Dialect/Vector/vector-transforms.mlir b/mlir/test/Dialect/Vector/vector-transforms.mlir --- a/mlir/test/Dialect/Vector/vector-transforms.mlir +++ b/mlir/test/Dialect/Vector/vector-transforms.mlir @@ -525,3 +525,11 @@ %cast = vector.bitcast %0: vector<8xf16> to vector<4xf32> return %cast: vector<4xf32> } + +// Make sure not crash on 0-D vector. +// CHECK-LABEL:func.func @vec_0D +// CHECK-NEXT:vector.bitcast +func.func @vec_0D(%arg0: vector) -> vector { + %0 = vector.bitcast %arg0 : vector to vector + return %0 : vector +}