AMDGPU: Unify divergent function exits.
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 24 Mar 2017 19:52:05 +0000 (19:52 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 24 Mar 2017 19:52:05 +0000 (19:52 +0000)
commitb8f8dbc227e8d08d6685bb2bc3131ac86e3ac24e
treebc699fbcc8daebe4e572a7841766102ebba64788
parentcbc69712da58c6e9a4d72fe37e829bb27409d3b8
AMDGPU: Unify divergent function exits.

StructurizeCFG can't handle cases with multiple
returns creating regions with multiple exits.
Create a copy of UnifyFunctionExitNodes that only
unifies exit nodes that skips exit nodes
with uniform branch sources.

llvm-svn: 298729
14 files changed:
llvm/include/llvm/IR/IntrinsicsAMDGPU.td
llvm/lib/Target/AMDGPU/AMDGPU.h
llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
llvm/lib/Target/AMDGPU/AMDGPUUnifyDivergentExitNodes.cpp [new file with mode: 0644]
llvm/lib/Target/AMDGPU/CMakeLists.txt
llvm/lib/Target/AMDGPU/SIInstrFormats.td
llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
llvm/lib/Target/AMDGPU/SIInstructions.td
llvm/test/CodeGen/AMDGPU/branch-condition-and.ll
llvm/test/CodeGen/AMDGPU/multi-divergent-exit-region.ll [new file with mode: 0644]
llvm/test/CodeGen/AMDGPU/ret_jump.ll
llvm/test/CodeGen/AMDGPU/si-annotate-cf-noloop.ll
llvm/test/CodeGen/AMDGPU/si-lower-control-flow-unreachable-block.ll
llvm/test/CodeGen/AMDGPU/valu-i1.ll