[AMDGPU] SILowerControlFlow::removeMBBifRedundant should not try to change MBB layout...
authoralex-t <alexander.timofeev@amd.com>
Wed, 14 Oct 2020 15:34:07 +0000 (18:34 +0300)
committeralex-t <alexander.timofeev@amd.com>
Thu, 15 Oct 2020 20:20:54 +0000 (23:20 +0300)
commit42ed3881200801651a2af47505dc7c59c0a5c959
tree004aa6891b4dccc49df8f2225c6a63343e8d6b56
parent2008dacf6ed3fbb862769c6936fd615c4ae05434
[AMDGPU] SILowerControlFlow::removeMBBifRedundant should not try to change MBB layout if it can fallthrough

removeMBBifRedundant normally tries to keep predecessors fallthrough when removing redundant MBB.
         It has to change MBBs layout to keep the new successor to immediately follow the predecessor of removed MBB.
         It only may be allowed in case the new successor itself has no successors to which it fall through.

Reviewed By: rampitec

Differential Revision: https://reviews.llvm.org/D89397
llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp
llvm/test/CodeGen/AMDGPU/collapse-endcf.mir