-
Notifications
You must be signed in to change notification settings - Fork 23
[CGP] Fix matching of uadd overflow #626
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
Conversation
|
Benchmark results: |
This patch fixes the issue where uadd overflow intrinsic is matched for: `Add = add A,(uint64_t)-1; Cmp = icmp ne A, 0` instead of: `Add = add A,-1; Cmp = icmp ne A, 0` where -1 is represented in 256 bits. PR: #626 Signed-off-by: Vladimir Radosavljevic <[email protected]>
6496869 to
c9e4418
Compare
|
✅ With the latest revision this PR passed the C/C++ code formatter. |
This patch fixes the issue where uadd overflow intrinsic is matched for: `Add = add A,(uint64_t)-1; Cmp = icmp ne A, 0` instead of: `Add = add A,-1; Cmp = icmp ne A, 0` where -1 is represented in 256 bits. PR: #626 Signed-off-by: Vladimir Radosavljevic <[email protected]>
c9e4418 to
7cfc8ab
Compare
akiramenai
left a comment
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.
It should be upsteamable, shouldn't it? E.g. we don't need i256 target to test this code, a test can be put to generic codegen tests or something.
Add tests where uadd overflow intrinsic is matched for: `Add = add A,(uint64_t)-1; Cmp = icmp ne A, 0` instead of: `Add = add A,-1; Cmp = icmp ne A, 0` where -1 is represented in 256 bits. Signed-off-by: Vladimir Radosavljevic <[email protected]>
This patch fixes the issue where uadd overflow intrinsic is matched for: `Add = add A,(uint64_t)-1; Cmp = icmp ne A, 0` instead of: `Add = add A,-1; Cmp = icmp ne A, 0` where -1 is represented in 256 bits. PR: #626 Signed-off-by: Vladimir Radosavljevic <[email protected]>
7cfc8ab to
098d481
Compare
Yes, this can be upstreamed. Unfortunately, there are only few generic CGP tests, others are in |
|
Closing in favor of #630. |
No description provided.