Page MenuHomePhabricator

InferAddressSpaces: Fix assert with unreachable code
ClosedPublic

Authored by arsenm on Sep 15 2020, 11:14 AM.

Details

Summary

Invalid IR in unreachable code is technically valid IR. In this case,
the address space of the value was never inferred, and we tried to
rewrite it with an invalid address space value which would assert.

Diff Detail

Event Timeline

arsenm created this revision.Sep 15 2020, 11:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 15 2020, 11:14 AM
arsenm requested review of this revision.Sep 15 2020, 11:14 AM
arsenm updated this revision to Diff 291984.Sep 15 2020, 11:22 AM

Add a test with a phi referencing itself just in case, although this worked before

This revision is now accepted and ready to land.Sep 15 2020, 11:24 AM
tra accepted this revision.Sep 15 2020, 11:33 AM
hliao accepted this revision.Sep 15 2020, 11:41 AM

LGTM