-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[clang][Interp] Add IntegralAP for arbitrary-precision integers #65844
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
@llvm/pr-subscribers-clang ChangesThis adds We use this for
|
e37b660
to
91058aa
Compare
Ping |
1 similar comment
Ping |
@@ -1596,6 +1599,9 @@ bool ByteCodeExprGen<Emitter>::visitZeroInitializer(QualType QT, | |||
return this->emitZeroSint64(E); | |||
case PT_Uint64: | |||
return this->emitZeroUint64(E); | |||
case PT_IntAP: | |||
case PT_IntAPS: | |||
assert(false); |
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.
Should this be an llvm_unreachable
?
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.
All the assert(false)
in this patch are just placeholders for things I need to implement in later patches. I'm trying to keep the patches smaller so they are easier to review.
@@ -26,6 +28,66 @@ static_assert(number != 10, ""); // expected-error{{failed}} \ | |||
// expected-note{{evaluates to}} \ | |||
// ref-note{{evaluates to}} | |||
|
|||
|
|||
namespace i128 { |
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.
@tbaederr
These tests fail on targets that do not have __int128 support.
You can reporoduce the issue by adding -triple=avr to the RUN lines.
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.
Oof, sorry. Everything was fine this morning and then I left the house... Will fix immediately.
Looks like this doesn't build on windows: http://45.33.8.238/win/84383/step_4.txt Please take a look and revert for now if it takes a while to fix. |
I pushed a fix that hopefully works, let me know if it doesn't. |
Still broken: http://45.33.8.238/win/84419/step_4.txt |
Hello, |
Sigh, will push a fix as soon as my local build is done. |
Local branch amd-gfx 2f63a36 Merged main:e7247f1010b5 into amd-gfx:b3bef5344f47 Remote branch main 18461dc [clang][Interp] Add IntegralAP for arbitrary-precision integers (llvm#65844)
This adds
IntegralAP
backing the two new primtypesIntAP
(unsinged arbitrary-precision int) andIntAPS
(same but signed).We use this for
int128
support (which isn't available on all host systems we support AFAIK) and I think we can also use this for_BitInt
later.