Skip to content

[HandshakeOptimizeBitwidths] Fix mux cycle extension#838

Merged
zero9178 merged 1 commit intomainfrom
users/zero9179/mux-wrong-sext
Apr 10, 2026
Merged

[HandshakeOptimizeBitwidths] Fix mux cycle extension#838
zero9178 merged 1 commit intomainfrom
users/zero9179/mux-wrong-sext

Conversation

@zero9178
Copy link
Copy Markdown
Collaborator

@zero9178 zero9178 commented Apr 8, 2026

Prior to this PR the cycle bitwidth reduction pattern correctly calculated the optimal bitwidth using backtracking on forwarded branch operands, but failed to do so when determining the extension type. The extension type was instead calculated using the data operands which was incorrect. This resulted in the wrong extension type being calculated at times.

This PR fixes that by calculating the extension type and optimal bitwidth of a cyclic mux at the same time.

Fixes #827
Required to land #816

Prior to this PR the cycle bitwidth reduction pattern correctly calculated the optimal bitwidth using backtracking on forwarded branch operands, but failed to do so when determining the extension type. The extension type was instead calculated using the data operands which was incorrect. This resulted in the wrong extension type being calculated at times.

This PR fixes that by calculating the extension type and optimal bitwidth of a cyclic mux at the same time.

Fixes #827
@zero9178 zero9178 requested a review from Jiahui17 April 8, 2026 11:31
@zero9178 zero9178 merged commit cf18058 into main Apr 10, 2026
8 checks passed
@zero9178 zero9178 deleted the users/zero9179/mux-wrong-sext branch April 20, 2026 09:11
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.

Another wrong extension type of mux

2 participants