[all-commits] [llvm/llvm-project] b32a56: [AMDGPU] Unify uniform return and divergent unreac...
bcahoon via All-commits
all-commits at lists.llvm.org
Tue Nov 29 11:34:07 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b32a5666a8ee5e1ce00918f9f2835b29973f6f64
https://github.com/llvm/llvm-project/commit/b32a5666a8ee5e1ce00918f9f2835b29973f6f64
Author: Brendon Cahoon <brendon.cahoon at amd.com>
Date: 2022-11-29 (Tue, 29 Nov 2022)
Changed paths:
M llvm/lib/Target/AMDGPU/AMDGPUUnifyDivergentExitNodes.cpp
M llvm/test/CodeGen/AMDGPU/GlobalISel/bool-legalization.ll
M llvm/test/CodeGen/AMDGPU/exec-mask-opt-cannot-create-empty-or-backward-segment.ll
A llvm/test/CodeGen/AMDGPU/si-unify-exit-return-unreachable.ll
M llvm/test/CodeGen/AMDGPU/skip-if-dead.ll
M llvm/test/CodeGen/AMDGPU/unstructured-cfg-def-use-issue.ll
Log Message:
-----------
[AMDGPU] Unify uniform return and divergent unreachable blocks
This patch fixes a "failed to annotate CFG" error in
SIAnnotateControlFlow. The problem occurs when there are
divergent and uniform unreachable/return blocks in the same
region. In this case, AMDGPUUnifyDivergentExitNodes does not
create a unified block so the region contains multiple exits.
StructurizeCFG does not work properly when there are multiple
exits, so the neccessary CFG transformations do not occur along
divergent control flow. Subsequently, SIAnnotateControlFlow
processes the path to the divergent exit block, but may only
partially process blocks along a unform control flow path to
another exit block.
This patch fixes the bug by creating a single exit block when
there is a divergent exit block in the function.
Differential revision: https://reviews.llvm.org/D136892
More information about the All-commits
mailing list