llvm-project/llvm/lib/Target/AMDGPU/Utils
Nicolai Haehnle 3ffd383a15 AMDGPU: Fix copying i1 value out of loop with non-uniform exit
Summary:
When an i1-value is defined inside of a loop and used outside of it, we
cannot simply use the SGPR bitmask from the loop's last iteration.

There are also useful and correct cases of an i1-value being copied between
basic blocks, e.g. when a condition is computed outside of a loop and used
inside it. The concept of dominators is not sufficient to capture what is
going on, so I propose the notion of "lane-dominators".

Fixes a bug encountered in Nier: Automata.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103743
Change-Id: If37b969ddc71d823ab3004aeafb9ea050e45bd9a

Reviewers: arsenm, rampitec

Subscribers: kzhuravl, wdng, mgorny, yaxunl, dstuttard, tpr, llvm-commits, t-tye

Differential Revision: https://reviews.llvm.org/D40547

llvm-svn: 329164
2018-04-04 10:57:58 +00:00
..
AMDGPUAsmUtils.cpp [AMDGPU] Add HW_REG_SH_MEM_BASES symbolic name for s_getreg_b32 2018-01-15 18:49:15 +00:00
AMDGPUAsmUtils.h [AMDGPU][MC] New syntax for ds_swizzle_b32 offset 2017-05-31 16:26:47 +00:00
AMDGPUBaseInfo.cpp AMDGPU: Make isIntrinsicSourceOfDivergence table-driven 2018-04-01 17:09:14 +00:00
AMDGPUBaseInfo.h Pass Divergence Analysis data to Selection DAG to drive divergence 2018-03-05 15:12:21 +00:00
AMDGPULaneDominator.cpp AMDGPU: Fix copying i1 value out of loop with non-uniform exit 2018-04-04 10:57:58 +00:00
AMDGPULaneDominator.h AMDGPU: Fix copying i1 value out of loop with non-uniform exit 2018-04-04 10:57:58 +00:00
AMDKernelCodeTInfo.h AMDGPU : Add trap handler support. 2017-02-10 02:15:29 +00:00
AMDKernelCodeTUtils.cpp [AMDGPU] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-08-10 00:46:15 +00:00
AMDKernelCodeTUtils.h [AMDGPU] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-08-10 00:46:15 +00:00
CMakeLists.txt AMDGPU: Fix copying i1 value out of loop with non-uniform exit 2018-04-04 10:57:58 +00:00
LLVMBuild.txt