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

Implement PtrToInt. #1163

Merged
merged 1 commit into from
May 17, 2024
Merged

Implement PtrToInt. #1163

merged 1 commit into from
May 17, 2024

Conversation

ptersilie
Copy link
Contributor

Since we cast them to zeroextend instructions, we only have to adjust some debug_asserts to make this work.

Requires: ykjit/ykllvm#158

@@ -40,5 +43,8 @@ binops:
%5 = fadd nnan float %flt, %flt
%6 = udiv exact i32 %num, 1
%7 = add <4 x i32> %vecnums, %vecnums
br label %casts
casts:
%8 = ptrtoint ptr %ptr to i8
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just need to add one more here for vectors.

@vext01
Copy link
Contributor

vext01 commented May 16, 2024

Note that due to the order of our ykllvm merges, #1164 will have to go in before this PR. There will be conflicts. Sorry.

@ltratt
Copy link
Contributor

ltratt commented May 16, 2024

It might only be the ykllvm submodule update that conflicts?

@vext01
Copy link
Contributor

vext01 commented May 16, 2024

We both changed the "unsupported" ll test. If there isn't a conflict, Lukas will have to rename his LLVM IR variable numbers so they are sequential again :)

@ptersilie
Copy link
Contributor Author

Here's the vector case. Will do the rebase once the other PRs are in.

@ptersilie
Copy link
Contributor Author

Can I squash and rebase?

@vext01
Copy link
Contributor

vext01 commented May 16, 2024

Go ahead.

@ptersilie
Copy link
Contributor Author

Managed to get out of merge conflict hell. Let's try again.

@vext01 vext01 added this pull request to the merge queue May 16, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 16, 2024
@vext01
Copy link
Contributor

vext01 commented May 16, 2024

16:07:08      Running `target/debug/xtask cfmt --check`
16:07:08 ./tests/c/ptrtoint.newcg.c:47:22: error: code should be clang-formatted [-Wclang-format-violations]
16:07:08     long ptr = (long) &loc;

@ptersilie
Copy link
Contributor Author

Ok to squash?

@vext01
Copy link
Contributor

vext01 commented May 17, 2024

go ahead.

Since we cast them to zeroextend instructions, we only have to adjust some
debug_asserts to make this work.
@ptersilie
Copy link
Contributor Author

Done.

@vext01 vext01 added this pull request to the merge queue May 17, 2024
Merged via the queue into ykjit:master with commit b442ad6 May 17, 2024
2 checks passed
@ptersilie ptersilie deleted the ptrtoint branch May 17, 2024 10:49
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.

3 participants