Skip to content

[MLIR] Canonicalisation of unreachable arith.addi hangs #153732

@Sirraide

Description

@Sirraide

Consider (https://godbolt.org/z/a4r55zdEd):

module @test {
  func.func @main() {
    cf.br ^bb4
  ^bb1(%2: i64):
    cf.br ^bb4
  ^bb3:
    %c1_i64_3 = arith.constant 1 : i64
    %9 = arith.addi %2, %c1_i64_3 : i64
    cf.br ^bb1(%9 : i64)
  ^bb4:
    return
  }
}

Attempting to canonicalise this with mlir-opt --canonicalize loops for ever; when I was running this in the debugger earlier before reducing it and dumped the add, it printed %7 = arith.addi %7, %c1_i64_3 : i64; so something doesn’t seem right here...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions