Files
clang-p2996/mlir/test/Transforms/gh-77420.mlir
Congcong Cai 46f65e45e0 [mlir]use correct iterator when eraseOp (#83444)
#66771 introduce `llvm::post_order(&r.front())` which is equal to
`r.front().getSuccessor(...)`.
It will visit the succ block of current block. But actually here need to
visit all block of region in reverse order.
Fixes: #77420.
2024-03-05 15:33:49 +08:00

22 lines
349 B
MLIR

// RUN: mlir-opt --canonicalize %s | FileCheck %s
module {
// CHECK: func.func @f() {
// CHECK-NEXT: return
// CHECK-NEXT: }
func.func @f() {
return
^bb1: // no predecessors
omp.parallel {
%0 = llvm.intr.stacksave : !llvm.ptr
llvm.br ^bb1
^bb1: // pred: ^bb0
omp.terminator
}
return
}
}