-
Notifications
You must be signed in to change notification settings - Fork 100
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
[CIR] Extend support for floating point attributes #572
base: main
Are you sure you want to change the base?
Conversation
Upstream patch: llvm/llvm-project#90442 |
c4db6d0
to
e197d4e
Compare
Nathan just did a rebase, can you please update? Sorry for the churn |
Rebased 🙏 |
Thanks for going the extra length to make sure this works! |
Merged upstream 🎉 |
@bcardosolopes - is there any planned rebase anytime soon? This PR is blocked by getting the upstream patch. Alternatively, I assume we can cherry-pick it here and there's a 95% chance that it will dissolve on the next rebase. Let me know what you prefer 🙏🏼 |
@lanza wdyt? |
I pushed a rebase just now. Should be good to go :p |
d3d3988
to
2a65d71
Compare
2a65d71
to
9c2c7ef
Compare
@bcardosolopes - I found some time this weekend to rebase and make this PR ready for merge :) |
✅ With the latest revision this PR passed the C/C++ code formatter. |
9c2c7ef
to
8c45c7c
Compare
This commit extends the support for floating point attributes parsing by using the new `AsmParser::parseFloat(fltSemnatics, APFloat&)` interface. As a drive-by, this commit also harmonizes the cir.fp print/parse namespace usage, and adds the constraint of supporting only "CIRFPType"s for cir.fp in tablegen instead of verifying it manually in the parsing logic.
8c45c7c
to
58cd2af
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.
Looks great, thank you!
This commit extends the support for floating point attributes parsing by using
the new
AsmParser::parseFloat(fltSemnatics, APFloat&)
interface.As a drive-by, this commit also harmonizes the cir.fp print/parse namespace
usage, and adds the constraint of supporting only "CIRFPType"s for cir.fp in
tablegen instead of verifying it manually in the parsing logic.
This commit is based on top of a to-be-upstreamed commit which extends the upstream MLIR float type parsing. Upstream parsing of float type has full capability only through parsing the Builtin Dialect's
FloatAttr
. Thos commit exposes the same capabilities to downstream users.This PR should resolve (at least)
GCC-C-execute-ieee-fp-cmp-2
andGCC-C-execute-ieee-fp-cmp-4
, paving the way to otherGCC-C-execute-ieee-*
tests passing from the SingleSource suite. It resolves #559 .