Skip to content

Conversation

uenoku
Copy link
Member

@uenoku uenoku commented Jun 28, 2025

This commit enhances the cat operation canonicalization in FIRRTLFolds.cpp to properly handle cases where operands have mixed signed and unsigned types.

The implementation now tracks whether signed and unsigned operands exist during cat flattening. When mixed types are present, it adds explicit casting of signed values to unsigned using AsUIntPrimOp. Single operand cases are also properly cast to unsigned if needed.

Fix #8618

…rands

This commit enhances the cat operation canonicalization in FIRRTLFolds.cpp to properly handle cases where operands have mixed signed and unsigned types.
Copy link
Member

@seldridge seldridge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@uenoku uenoku merged commit 1b810c5 into llvm:main Jun 28, 2025
5 checks passed
TaoBi22 pushed a commit to TaoBi22/circt that referenced this pull request Jul 17, 2025
…rands (llvm#8621)

This commit enhances the cat operation canonicalization in FIRRTLFolds.cpp to properly handle cases where operands have mixed signed and unsigned types.

The implementation now tracks whether signed and unsigned operands exist during cat flattening. When mixed types are present, it adds explicit casting of signed values to unsigned using AsUIntPrimOp. Single operand cases are also properly cast to unsigned if needed.

Fix llvm#8618
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] Chisel generates FIRRTL which fails new Cat signedness check
2 participants