This is an archive of the discontinued LLVM Phabricator instance.

[nfc] Accept addrspacecast allocas in InitTempAlloca
AbandonedPublic

Authored by JonChesterfield on Apr 20 2020, 7:47 AM.

Details

Summary

[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.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptApr 20 2020, 7:47 AM

Needs test?

Needs test?

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.

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.

JonChesterfield abandoned this revision.EditedApr 20 2020, 3:21 PM

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.

saiislam removed a subscriber: saiislam.