Skip to content

Conversation

@RiverDave
Copy link
Collaborator

@RiverDave RiverDave commented Dec 9, 2025

Replaces the assertion with a call to performAddrSpaceCast for __builtin_alloca__

  • Converts the type and passes the appropriate address space attributes
    Added a new test file clang/test/CIR/CodeGen/dynamic-alloca-with-address-space.c that verifies:
    • CIR generation for dynamic allocas with address spaces
    • LLVM IR generation from CIR matches expected output
    • Generated LLVM IR matches the output from the original code generator

The test specifically targets the AMD GPU target (amdgcn-amd-amdhsa) which uses non-default address spaces.

@RiverDave
Copy link
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

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.

2 participants