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

[CIR][Lowering] Add MLIR lowering support for CIR shift operations #630

Merged
merged 4 commits into from
May 29, 2024

Conversation

Kritoooo
Copy link
Contributor

This pr adds cir.shift lowering to MLIR passes and test files.

Copy link
Member

@Lancern Lancern left a comment

Choose a reason for hiding this comment

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

Minor nits

Comment on lines 340 to 341
else
return rewriter.create<mlir::arith::BitcastOp>(loc, dstTy, src);
Copy link
Member

Choose a reason for hiding this comment

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

No tests cover this branch. Consider adding a test for it.

Besides, CIR currently does not generate MLIR integer types with signedness semantics. Thus the bitcast here should be unnecessary. But this involves modifying existing code so it's OK if you don't address this in this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are right, I have added test coverage for the last branch

@Kritoooo Kritoooo requested a review from Lancern May 27, 2024 05:48
Copy link
Member

@Lancern Lancern left a comment

Choose a reason for hiding this comment

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

LGTM.

@bcardosolopes bcardosolopes merged commit 9e87cfc into llvm:main May 29, 2024
6 checks passed
@Kritoooo Kritoooo deleted the cir_milr_shift branch May 29, 2024 08:18
bruteforceboy pushed a commit to bruteforceboy/clangir that referenced this pull request Oct 2, 2024
…lvm#630)

This pr adds cir.shift lowering to MLIR passes and test files.
Hugobros3 pushed a commit to shady-gang/clangir that referenced this pull request Oct 2, 2024
…lvm#630)

This pr adds cir.shift lowering to MLIR passes and test files.
smeenai pushed a commit to smeenai/clangir that referenced this pull request Oct 9, 2024
…lvm#630)

This pr adds cir.shift lowering to MLIR passes and test files.
keryell pushed a commit to keryell/clangir that referenced this pull request Oct 19, 2024
…lvm#630)

This pr adds cir.shift lowering to MLIR passes and test files.
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.

3 participants