-
Notifications
You must be signed in to change notification settings - Fork 3
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
[FXML-4614] Add EmitC index types, lower arith.index_cast, arith.index_castui #183
Conversation
Leaving this here for today, with the linker failing -- it works on my end with a clean build, so what happens here in the CI is really strange. |
Try adding the |
mlir/test/Conversion/ArithToEmitC/arith-to-emitc-unsupported.mlir
Outdated
Show resolved
Hide resolved
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.
Looks good!
Can you please check that the behavior of casting between index and i1/bool is correct? Bool behaves pretty special (not truncating but checks v != 0). |
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.
LGTM. Discussed offline a small possible (although unlikely) issue with ssize_t.
Good remark. We don't handle that and the same remark was formulated for float-to-int casts where this was made illegal. Per the semantics of |
Sounds good! |
To be more specific @josel-amd : the discussion was on the fact that |
…ith.index_castui (#183)" This commit breaks pipelines using ArithToEmitC on programsusing index variables both inside and outside the arith dialect.
This PR:
emitc.size_t
andemitc.ssize_t
data types, and a type converter (index goes toemitc.size_t
),arith.index_cast
,arith.index_castui
.