This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine] Gracefully handle an alloca outside the alloca-AS
ClosedPublic

Authored by jdoerfert on Jun 24 2021, 10:08 AM.

Details

Summary

While we might eventually want to disallow allocas that do not have the
alloca-AS set, it seems undesirable to crash on them. Add a cast when
required so that we can support such allocas (at least here).

Diff Detail

Event Timeline

jdoerfert created this revision.Jun 24 2021, 10:08 AM
jdoerfert requested review of this revision.Jun 24 2021, 10:08 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 24 2021, 10:08 AM
Herald added subscribers: sstefan1, wdng. · View Herald Transcript

thx for pushing this up. giving it a whirl

jdoerfert updated this revision to Diff 354293.EditedJun 24 2021, 10:20 AM

Make test more meaningful, insert the cast at the right position

thx for pushing this up. giving it a whirl

We'll actually going to create the allocas in heap-2-stack in the right address space later but this is an independent problem we need to fix. The original test exposed another one too, should all be better by tomorrow.

ronlieb accepted this revision.Jun 24 2021, 12:57 PM

gets my unblocked, thx

This revision is now accepted and ready to land.Jun 24 2021, 12:57 PM

Hi Johannes, can this patch land?
i hit an instance of the issue it fixes, while compiling (attempting to) picongpu using trunk clang for amdgpu.

This revision was landed with ongoing or failed builds.Jun 29 2021, 7:39 AM
This revision was automatically updated to reflect the committed changes.