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

Generic integer semantics #51

Merged
merged 6 commits into from
Feb 17, 2025
Merged

Conversation

qaco
Copy link
Contributor

@qaco qaco commented Dec 12, 2024

Generic integer semantics sound enough to be the foundation of PDL to SMT passes.

@qaco qaco self-assigned this Dec 12, 2024
@qaco qaco requested a review from math-fehr December 12, 2024 17:11
Copy link
Contributor

@math-fehr math-fehr left a comment

Choose a reason for hiding this comment

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

Nice! I added some comments but otherwise looks good!

Comment on lines 10 to 12
// CHECK: %block_id1 = "smt.int.constant"() {"value" = 0 : i64} : () -> !smt.int.int
// CHECK-NEXT: %block_id2 = "smt.int.constant"() {"value" = 1 : i64} : () -> !smt.int.int
// CHECK-NEXT: %block_id3 = "smt.int.constant"() {"value" = 2 : i64} : () -> !smt.int.int
// CHECK: %block_id1 = "smt.int.constant"() {"value" = 0 : ui128} : () -> !smt.int.int
// CHECK-NEXT: %block_id2 = "smt.int.constant"() {"value" = 1 : ui128} : () -> !smt.int.int
// CHECK-NEXT: %block_id3 = "smt.int.constant"() {"value" = 2 : ui128} : () -> !smt.int.int
Copy link
Contributor

Choose a reason for hiding this comment

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

I'll fix this in another PR, but actually we have the IntAttr attribute that can represent arbitrary bitwidth integers, it's probably better suited here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh ok nice

@qaco qaco requested a review from math-fehr December 17, 2024 13:49
@math-fehr math-fehr merged commit 774564e into opencompl:main Feb 17, 2025
1 of 2 checks passed
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.

2 participants