HomePhabricator

[AMDGPU] SIRemoveShortExecBranches should not remove branches exiting loops

Authored by critson on Jan 21 2020, 8:11 PM.

Description

[AMDGPU] SIRemoveShortExecBranches should not remove branches exiting loops

Summary:
Check that a s_cbranch_execz is not a loop exit before removing it.
As the pass is generating infinite loops.

Reviewers: cdevadas, arsenm, nhaehnle

Reviewed By: nhaehnle

Subscribers: kzhuravl, jvesely, wdng, yaxunl, tpr, t-tye, hiraditya, kerbowa, llvm-commits, dstuttard, foad

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D72997