Skip to content

[MLIR][CF][Canonicalizer] infinite loop trying to simplify control flow #159743

@rscottmanley

Description

@rscottmanley

The following test case will result in a compile-time infinite loop if you run mlir-opt -canonicalizer

module {
  func.func @infloop_() {
    %false = arith.constant false
    cf.cond_br %false, ^bb1, ^bb2
  ^bb1:  // 2 preds: ^bb0, ^bb2
    cf.br ^bb2
  ^bb2:  // 2 preds: ^bb0, ^bb1
    cf.br ^bb1
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    hangCompiler hang (infinite loop)mlir:cf

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions