[AMDGPU] Unify divergent nodes if the PostDom tree has one root
authorAnshil Gandhi <gandhi21299@gmail.com>
Wed, 4 Jan 2023 17:10:40 +0000 (10:10 -0700)
committerAnshil Gandhi <gandhi21299@gmail.com>
Wed, 4 Jan 2023 17:45:03 +0000 (10:45 -0700)
commit4bbcbdaee5c937b17baaf04357383c8b15d408f2
tree7f7139bf82629b06d3f1187d973e9fd6ad05bde7
parente9c82423939742ba85c497f16dcac6a547534b67
[AMDGPU] Unify divergent nodes if the PostDom tree has one root

This patch allows AMDGPUUnifyDivergenceExitNodes pass
to transform a function whose PDT has exactly one root
and ends in a branch instruction. Fixes
https://github.com/llvm/llvm-project/issues/58861.

Reviewed By: ruiling, arsenm

Differential Revision: https://reviews.llvm.org/D139780
13 files changed:
llvm/lib/Target/AMDGPU/AMDGPUUnifyDivergentExitNodes.cpp
llvm/test/CodeGen/AMDGPU/agpr-copy-no-free-registers.ll
llvm/test/CodeGen/AMDGPU/branch-relaxation.ll
llvm/test/CodeGen/AMDGPU/cf-loop-on-constant.ll
llvm/test/CodeGen/AMDGPU/control-flow-optnone.ll
llvm/test/CodeGen/AMDGPU/infinite-loop.ll
llvm/test/CodeGen/AMDGPU/kill-infinite-loop.ll
llvm/test/CodeGen/AMDGPU/loop-live-out-copy-undef-subrange.ll
llvm/test/CodeGen/AMDGPU/optimize-negated-cond.ll
llvm/test/CodeGen/AMDGPU/si-annotate-nested-control-flows.ll [new file with mode: 0644]
llvm/test/CodeGen/AMDGPU/unstructured-cfg-def-use-issue.ll
llvm/test/CodeGen/AMDGPU/vgpr-descriptor-waterfall-loop-idom-update.ll
llvm/test/Transforms/LoopStrengthReduce/AMDGPU/different-addrspace-crash.ll