[nfc] Accept addrspacecast allocas in InitTempAlloca
Changes the precondition to be slightly more permissive. Useful for amdgcn where
allocas are created with a cast to an address space.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
I'm not sure how to write said test. How do we normally hit asserts from the clang test suite?
This fires a lot in the openmp on amdgcn downstream branch, but I'm happy carrying this as a local patch until the rest of the clang change can be put up for review if preferred.
Comment Actions
You're not testing an assertion, you're testing that code is generated correctly for some file on amdgcn. Just write an ordinary IR-generation test that currently crashes and this test fixes.
This is not an NFC change.
Comment Actions
No problem. This isn't on the live path - the function is mostly called from openmp codegen and clang doesn't target openmp/amdgcn just yet. I'll roll this change into the codegen patch to enable that.