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

Fix lowering of big structs passed by value #751

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Jezurko
Copy link
Collaborator

@Jezurko Jezurko commented Nov 22, 2024

  • Don't load+store in caller
  • Fix loads and stores in callee
  • Check if we need additional checks
  • Add test:
struct big { int i[sizeof (int) >= 4 && sizeof (void *) >= 4 ? 0x4000 : 4]; };
struct big gb;
int foo (struct big b, int x) { return b.i[x]; }
int main (void) { return foo (gb, 0) + foo (gb, 1); }

@Jezurko Jezurko assigned Jezurko and unassigned Jezurko Nov 22, 2024
Copy link
Contributor

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-format (v19.1.1) reports: 1 file(s) not formatted
  • lib/vast/Conversion/ABI/LowerABI.cpp

Have any feedback or feature suggestions? Share it here.

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.

1 participant