[AMDGPU] Don't handle export done when unify exit nodes
authorRuiling Song <ruiling.song@amd.com>
Thu, 8 Jul 2021 01:42:06 +0000 (09:42 +0800)
committerRuiling Song <ruiling.song@amd.com>
Wed, 14 Jul 2021 06:54:37 +0000 (14:54 +0800)
commitd9b9fdd91bb49292cf7c01bb72ece7e9d9f2e9ac
treeaf535acfb81946d0ee14fae32eabb7b82f2dd827
parent1d9585c8c1ce5c6b9d2e16ba476294b0ee8d9edb
[AMDGPU] Don't handle export done when unify exit nodes

This patch aims to revert the changes introduced by D70781 D71192 D76364

D70781 was introduced to fix hardware hang where we do not insert exp-
null-done for a kill inside infinit loop. At that time we have not added
exp-null-done for kill early termination, but I believe as for now, we will
always add the exp-null-done for early termination case in LaterBranchLowering.

D71192 was introduced to handle the only_kill case, which is also been
handled by the kill early termination work.

D76364 was used to fix a regression by D71192, where we cleared the done
bit of the export in the existing program and not let the normal return
block branching to the new unified return block.

With this change, we just trust frontends have setup exp-done correctly
which is true for all existing frontends. The backend only inserts
exp-null-done for the kill cases which is handled in SILateBranchLowering.cpp.

Reviewed by: critson

Differential Revision: https://reviews.llvm.org/D105610
llvm/lib/Target/AMDGPU/AMDGPUUnifyDivergentExitNodes.cpp
llvm/test/CodeGen/AMDGPU/kill-infinite-loop.ll
llvm/test/CodeGen/AMDGPU/multi-divergent-exit-region.ll
llvm/test/CodeGen/AMDGPU/update-phi.ll