Skip to content

[Seq] Register symbol with special characters does not round-trip #8833

@fabianschuiki

Description

@fabianschuiki

It looks like a sym @... on a seq.compreg (and likely any other op that can have an inner symbol) gets printed without "..." even if it contains special characters:

// foo.mlir
hw.module @Foo(in %a: i42, in %clk: !seq.clock) {
  %0 = seq.compreg sym @"foo/bar" %a, %clk : i42
  hw.output
}

// after circt-opt foo.mlir
hw.module @Foo(in %a : i42, in %clk : !seq.clock) {
  %0 = seq.compreg sym @foo/bar %a, %clk : i42
  hw.output
}

// after circt-opt foo.mlir | circt-opt
<stdin>:3:30: error: expected SSA operand
    %0 = seq.compreg sym @foo/bar %a, %clk : i42
                             ^

This also gets cought by running circt-opt --verify-roundtrip. Adding that to the basic dialect tests alongside an op with a symbol like the above should trigger the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    SeqInvolving the `seq` dialectbugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions