Skip to content

[FIRRTL] Bounce non-connect users of dropped zero-width instance ports - #11118

Open
arcusbuilds wants to merge 1 commit into
llvm:mainfrom
arcusbuilds:firrtl-lowersignatures-zero-width-users
Open

arcusbuilds wants to merge 1 commit into
llvm:mainfrom
arcusbuilds:firrtl-lowersignatures-zero-width-users

Conversation

@arcusbuilds

Copy link
Copy Markdown

LowerSignatures drops zero-width ports from scalarized instances, then asserts that every leftover user is a connect, so a legal sizeof of such a port crashes firtool --scalarize-internal-modules=true.
Connects are still erased; any other user now reads a wire of the original type, the same way lowerModuleSignature already handles dropped module ports.
Test added in lower-signatures.mlir. This is independent of #11090: LowerSignatures runs before the new LowerSizeOf pass, so the crash remains with it.

Fixes #11063

Assisted-by: Claude Code:claude-fable-5

LowerSignatures drops zero-width ports from scalarized instances and then
asserted that every remaining user of the old result was a connect.  Legal
consumers such as sizeof crashed the compiler (or produced invalid IR in
release builds).  Replace such results with a wire of the original type,
mirroring the existing handling of dropped module ports.

Fixes llvm#11063

Assisted-by: Claude Code:claude-fable-5
@circt-bot

circt-bot Bot commented Sep 16, 2026

Copy link
Copy Markdown

Results of circt-tests run for b04ece0 compared to results for 9a26851: no change to test results.

This branch has not been deployed

No deployments
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.

[FIRRTL] zero-width aggregate consumers crash or produce invalid IR

1 participant