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

[CIR][ABI] Add X86_64 float and double CC lowering #714

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

sitio-couto
Copy link
Collaborator

Implements calling convention lowering of float and double arguments and return values conventions for X86_64.

Copy link
Member

@bcardosolopes bcardosolopes left a comment

Choose a reason for hiding this comment

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

LGTM!

@bcardosolopes
Copy link
Member

Good to merge when the tests get fixed. From the bots, looks like it's triggering an assert:

Assertion failed: (llvm::isPowerOf2_32(Align) && "Alignment must be power of 2"), function getTypeInfoImpl, file CIRLowerContext.cpp, line 94.

Implements calling convention lowering of float and double arguments and
return values conventions for X86_64.
@sitio-couto sitio-couto force-pushed the vinicius/add-x86-fp-cc-lowering branch from 95c6122 to 8abc5a5 Compare July 4, 2024 14:56
@sitio-couto
Copy link
Collaborator Author

sitio-couto commented Jul 4, 2024

@bcardosolopes I'll be running the x86_64/AArch64 CC lowering tests only when the ClangIR build is for Ubuntu. Windows and Darwin each have different behaviors and are throwing different issues. Setting up a dev environment for all three platforms would take too much time.

Implements calling convention lowering of bool arguments and return
value calling conventions for X86_64. This is a bit of an odd case: in
the orignal codegen bools are represented as i8 everywhere, except for
function arguments/return values. In CIR, we don't allow i1 types, so
bools are still represented as `cir.bool` when in functions. However,
when lowering to LLVM Dialect, we need to ensure bools will be converted
to i1 when in function's argument/return values.
@bcardosolopes
Copy link
Member

@bcardosolopes I'll be running the x86_64/AArch64 CC lowering tests only when the ClangIR build is for Ubuntu. Windows and Darwin each have different behaviors and are throwing different issues. Setting up a dev environment for all three platforms would take too much time.

Unfortunately that's not acceptable, you should look at OG codegen tests and figure out what silly thing is missing, it's subtle but shouldn't be complicated - the host shouldn't affect codegen for the target.

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.

None yet

2 participants