Skip to content

[HW] Incorrect SSA names for instance op.  #7142

@uenoku

Description

@uenoku

Reported in discord

$ cat bar.mlir
hw.module.extern @foo( in %in_0 : i32, out "out0" : i1 )
hw.module @bar(out "out0" : i1) {
    %t1 = hw.constant -3 : i32
    %t2 = hw.instance "%103" @foo(in_0 : %t1 : i32) -> (out0 : i1)
    hw.output  %t2 : i1
}

$ circt-opt bar.mlir
  hw.module @bar(out out0 : i1) {
    %c-3_i32 = hw.constant -3 : i32
    %25103.out0 = hw.instance "%103" @foo(in_0: %c-3_i32: i32) -> (out0: i1)
    hw.output %25103.out0 : i1
  }

$ circt-opt bar.mlir | circt-opt
  hw.module @bar(out out0 : i1) {
    %c-3_i32 = hw.constant -3 : i32
    %25103.out0 = hw.instance "%103" @foo(in_0: %c-3_i32: i32) -> (out0: i1)
    hw.output %25103.out0 : i1
  }

<stdin>:5:12: error: expected three consecutive dots for an ellipsis
    %25103.out0 = hw.instance "%103" @foo(in_0: %c-3_i32: i32) -> (out0: i1)

h/t Steven Derrien

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions