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

Disallow Type::narrow() and Type::widen() from producing bitwidths between 1 and 8 bits #6622

Merged
merged 3 commits into from
Feb 22, 2022

Conversation

rootjalex
Copy link
Member

Allowing these methods to create bitwidths of 2 and 4 can cause issues with find_intrinsics. Specifically, this fixes #6601 .

Discussed with @abadams .

@abadams
Copy link
Member

abadams commented Feb 18, 2022

What should happen if you narrow a uint1?

@rootjalex
Copy link
Member Author

@abadams I guess either an error, or a uint1. I think an error is better, and am happy to add that to this PR

@abadams
Copy link
Member

abadams commented Feb 19, 2022

An error sgtm

@rootjalex rootjalex requested review from halidebuildbots and abadams and removed request for halidebuildbots February 21, 2022 16:23
@rootjalex
Copy link
Member Author

Test failure seems unrelated

@rootjalex rootjalex merged commit b2edbc9 into main Feb 22, 2022
@rootjalex rootjalex deleted the rootjalex/find_intrinsics-bugfix branch February 22, 2022 20:09
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.

FindIntrinsics creates incorrect IR for casts from bool to arithmetic type
2 participants