[Mlir-commits] [mlir] [MLIR][Operation] Fix `isBeforeInBlock` crash bug mentioned in https://github.com/llvm/llvm-project/issues/60909 (PR #101172)
Guray Ozen
llvmlistbot at llvm.org
Wed Aug 14 00:15:32 PDT 2024
================
@@ -0,0 +1,19 @@
+// RUN: mlir-opt %s -pass-pipeline="builtin.module(func.func(convert-scf-to-cf), func.func(test-print-liveness))"
+
+module {
+ func.func @for_if_for(%arg0: index, %arg1: index, %arg2: index, %arg3: i1) {
+ %cst = arith.constant dense<0.000000e+00> : tensor<128x32xf16>
+ %0 = scf.for %arg4 = %arg0 to %arg1 step %arg2 iter_args(%arg5 = %cst) -> (tensor<128x32xf16>) {
+ %1 = scf.if %arg3 -> (tensor<128x32xf16>) {
+ scf.yield %arg5 : tensor<128x32xf16>
+ } else {
+ %2 = scf.for %arg6 = %arg0 to %arg1 step %arg2 iter_args(%arg7 = %arg5) -> (tensor<128x32xf16>) {
+ scf.yield %arg7 : tensor<128x32xf16>
+ }
+ scf.yield %2 : tensor<128x32xf16>
+ }
+ scf.yield %1 : tensor<128x32xf16>
+ }
+ return
+ }
+}
----------------
grypp wrote:
nit : nl
https://github.com/llvm/llvm-project/pull/101172
More information about the Mlir-commits
mailing list