Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SCFToCalyx] Lower Arith Bitcast #8294

Merged
merged 2 commits into from
Mar 4, 2025
Merged

Conversation

jiahanxie353
Copy link
Contributor

@jiahanxie353 jiahanxie353 commented Mar 4, 2025

This is my current proposal on how to lower arith.bitcast should be lowered, not 100% sure.

Since Calyx treat everything as bit vectors, I just keep every bit unchanged.

@jiahanxie353 jiahanxie353 self-assigned this Mar 4, 2025
@jiahanxie353 jiahanxie353 added the Calyx The Calyx dialect label Mar 4, 2025
@@ -1500,6 +1501,12 @@ LogicalResult BuildOpGroups::buildOp(PatternRewriter &rewriter,
return res;
}

LogicalResult BuildOpGroups::buildOp(PatternRewriter &rewriter,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
LogicalResult BuildOpGroups::buildOp(PatternRewriter &rewriter,
// The Calyx language treats values as bit vectors, i.e., there is no type system,
// so this is essentially a no-op.
LogicalResult BuildOpGroups::buildOp(PatternRewriter &rewriter,

@@ -1500,6 +1501,12 @@ LogicalResult BuildOpGroups::buildOp(PatternRewriter &rewriter,
return res;
}

LogicalResult BuildOpGroups::buildOp(PatternRewriter &rewriter,
Copy link
Member

Choose a reason for hiding this comment

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

Please add a small unit test as well

@jiahanxie353 jiahanxie353 marked this pull request as ready for review March 4, 2025 22:39
@jiahanxie353 jiahanxie353 merged commit f4defc5 into llvm:main Mar 4, 2025
3 checks passed
@jiahanxie353 jiahanxie353 deleted the calyx-bitcast branch March 4, 2025 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Calyx The Calyx dialect
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants