This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Fix AMDGPUUnifyDivergentExitNodes
ClosedPublic

Authored by piotr on Mar 18 2020, 7:36 AM.

Details

Summary

For the case where "done" bits on existing exports are removed
by unifyReturnBlockSet(), unify all return blocks - even the
uniformly reached ones. We do not want to end up with a non-unified,
uniformly reached block containing a normal export with the "done"
bit cleared.

That case is believed to be rare - possible with infinite loops
in pixel shaders.

This is a fix for D71192.

Diff Detail

Event Timeline

piotr created this revision.Mar 18 2020, 7:36 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 18 2020, 7:36 AM
piotr added a comment.Mar 18 2020, 7:37 AM

See D71192#1895125 for more context.

piotr updated this revision to Diff 251082.Mar 18 2020, 7:40 AM

Fix formatting.

arsenm added inline comments.Mar 18 2020, 7:51 AM
llvm/test/CodeGen/AMDGPU/multi-divergent-exit-region.ll
747

Extra newlines

763

Can drop attribute comment

arsenm accepted this revision.Mar 18 2020, 8:09 AM

I think this makes sense

This revision is now accepted and ready to land.Mar 18 2020, 8:09 AM
cwabbott added inline comments.Mar 18 2020, 8:54 AM
llvm/test/CodeGen/AMDGPU/multi-divergent-exit-region.ll
752

You don't need .preheader.1 anymore and can delete it, right?

piotr marked an inline comment as done.Mar 18 2020, 8:57 AM
piotr added inline comments.
llvm/test/CodeGen/AMDGPU/multi-divergent-exit-region.ll
752

Yes, the test could be simplified i guess. I just took the version I had generated. (I just pressed "submit", so can do it in another commit).

This revision was automatically updated to reflect the committed changes.
piotr marked an inline comment as done.Mar 19 2020, 6:56 AM
piotr added inline comments.
llvm/test/CodeGen/AMDGPU/multi-divergent-exit-region.ll
752