HomePhabricator

AMDGPU: Fix a SIAnnotateControlFlow issue when there are multiple backedges.

Authored by cfang on Mar 15 2019, 2:02 PM.

Description

AMDGPU: Fix a SIAnnotateControlFlow issue when there are multiple backedges.

Summary:
At the exit of the loop, the compiler uses a register to remember and accumulate
the number of threads that have already exited. When all active threads exit the
loop, this register is used to restore the exec mask, and the execution continues
for the post loop code.

When there is a "continue" in the loop, the compiler made a mistake to reset the
register to 0 when the "continue" backedge is taken. This will result in some
threads not executing the post loop code as they are supposed to.

This patch fixed the issue.

Reviewers:

nhaehnle, arsenm

Differential Revision:

https://reviews.llvm.org/D59312

llvm-svn: 356298

Details

Committed
cfangMar 15 2019, 2:02 PM
Differential Revision
D59312: AMDGPU: Fix a SIAnnotateControlFlow issue when there are multiple backedges.
Parents
rG5ac90b8ba1b3: [CMake] Correct CMake message mode
Branches
Unknown
Tags
Unknown