-
Notifications
You must be signed in to change notification settings - Fork 40
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
arith_ext: add lowering to arith operations #715
Conversation
3d3aa7c
to
bf95bb5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me (but does need a rebase/squash) :)
bf95bb5
to
ebbbcef
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update/rebase!
|
||
// Using DRR to generate the lowering patterns for specific operations | ||
|
||
defvar DefGE = ConstantEnumCase<Arith_CmpIPredicateAttr, "uge">; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we will always want this to be unsigned (uge = unsigned greater equal) vs signed. I feel that perhaps we should all agree on the semantics of arith_ext ops on this front, i.e., that we always take the representative in [0, modulus) for modular operations.
Still happy to submit and revisit this later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree we should discuss this further.
I think if we let it be signed then we will have similar confusion/issue with using RemSI where it treats both operands as signed and we generally don't want the second operand to be signed.
FWIW, in the context of HEaan, they do make the assumption that it is an unsigned input.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was planning to spend some time in the next meeting on discussing how we model modular arithmetic, and data-type semantics in general, and I think the signedness question would be a good addition to the list :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Following up on #711