This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Fix crash with unreachable terminators.
ClosedPublic

Authored by arsenm on Apr 28 2016, 11:12 PM.

Details

Summary

If a block has no successors because it ends in unreachable,
this was accessing an invalid iterator.

Also stop counting instructions that don't emit any
real instructions.

Diff Detail

Event Timeline

arsenm updated this revision to Diff 55532.Apr 28 2016, 11:12 PM
arsenm retitled this revision from to AMDGPU: Fix crash with unreachable terminators..
arsenm updated this object.
arsenm added reviewers: tstellarAMD, nhaehnle.
arsenm added a subscriber: llvm-commits.
arsenm updated this revision to Diff 55533.Apr 28 2016, 11:12 PM

Forgot to add test file

nhaehnle accepted this revision.Apr 29 2016, 10:03 AM
nhaehnle edited edge metadata.

LGTM

This revision is now accepted and ready to land.Apr 29 2016, 10:03 AM
arsenm closed this revision.Apr 29 2016, 2:58 PM

r268119