Skip to content

[Arc] AddTaps: guard self-referential hw.wire against RAUW-with-self - #10896

Open
AmurG wants to merge 1 commit into
llvm:mainfrom
AmurG:pr-arc-addtaps-selfwire-20260723
Open

[Arc] AddTaps: guard self-referential hw.wire against RAUW-with-self#10896
AmurG wants to merge 1 commit into
llvm:mainfrom
AmurG:pr-arc-addtaps-selfwire-20260723

Conversation

@AmurG

@AmurG AmurG commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

assign w = w; yields a self-referential hw.wire, and replacing its result with its input RAUWs the value with itself, so the pass spun forever. We substitute a zero constant for integer self-wires (the two-valued reading of an undriven net) and leave non-integer self-wires in place.

…hang

A degenerate self-linked wire (`assign w = w;`, ivtest pr509.v) reaches
tap(hw::WireOp) with input == result; replaceAllUsesWith then replaces the
value with itself and never drains the use list, hanging the pass. Such a
wire carries no driver: materialize a zero constant for its users (two-valued
interpretation of an undriven net) and erase the wire; non-integer self-wires
are left in place.
@circt-bot

circt-bot Bot commented Jul 23, 2026

Copy link
Copy Markdown

Results of circt-tests run for ac2118a compared to results for 7c915f5: no change to test results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant