Page MenuHomePhabricator

AMDGPU: Remove PHI loop condition optimization

Authored by nhaehnle on Oct 17 2018, 2:11 AM.



The optimization to early break out of loops if all threads are dead was
never fully implemented.

But the PHI node analyzing is actually causing a number of problems, so
remove all the extra code for it.

(This does actually regress code quality in a few places because it
ends up relying more heavily on phi's of i1, which we don't do a
great job with. However, since it fixes real bugs in the wild, we
should take this change. I have some prototype changes to improve
i1 lowering in general -- not just for control flow -- which should
help recover the code quality, I just need to make those changes
fit for general consumption. -- Nicolai)

Change-Id: I6fc6c6c8961857ac6009fcfb9f7e5e48dc23fbb1
Patch-by: Christian König <>

Diff Detail


Event Timeline

nhaehnle created this revision.Oct 17 2018, 2:11 AM

Thank you for this really important fix!

This revision is now accepted and ready to land.Oct 19 2018, 2:51 PM
This revision was automatically updated to reflect the committed changes.