[Mlir-commits] [flang] [mlir] [compiler-rt] [clang-tools-extra] [clang] [libcxx] [llvm] [mlir] Fix a zero stride canonicalizer crash (PR #74200)
Rik Huijzer
llvmlistbot at llvm.org
Tue Dec 5 01:40:10 PST 2023
================
@@ -0,0 +1,14 @@
+// RUN: mlir-opt %s -inline -split-input-file | FileCheck %s
+
+// CHECK-LABEL: func @inline_negative_stride
+func.func @inline_negative_stride(%arg0 : memref<10xf32>) -> memref<1xf32, strided<[?], offset: 1>> {
+ cf.br ^bb1(%arg0 : memref<10xf32>)
+^bb1(%m: memref<10xf32>):
+ %c0 = arith.constant 0 : index
+ %c1 = arith.constant 1 : index
+ %1 = memref.subview %m[1] [1] [%c0] : memref<10xf32> to memref<1xf32, strided<[?], offset: 1>>
+ return %1 : memref<1xf32, strided<[?], offset: 1>>
+}
+// CHECK-NEXT: arith.constant 0 : index
+// CHECK-NEXT: %[[SUBVIEW:.*]] = memref.subview
+// CHECK-NEXT: return %[[SUBVIEW]] : memref<1xf32, strided<[?], offset: 1>>
----------------
rikhuijzer wrote:
I removed this file again. 👍
https://github.com/llvm/llvm-project/pull/74200
More information about the Mlir-commits
mailing list