AMDGPU/GlobalISel: Fix branch targets when emitting SI_IF
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 6 Jan 2020 03:09:24 +0000 (22:09 -0500)
committerMatt Arsenault <arsenm2@gmail.com>
Mon, 13 Jan 2020 17:51:05 +0000 (12:51 -0500)
commitca19d7a3993c69633826ae388155c9ad176b11df
treedd2a0dbcff6b448d2ad33365968d0c0318aabbf6
parent7d9b0a61c32b95fdc73228266d3f14687a8ada95
AMDGPU/GlobalISel: Fix branch targets when emitting SI_IF

The branch target needs to be changed depending on whether there is an
unconditional branch or not.

Loops also need to be similarly fixed, but compiling a simple testcase
end to end requires another set of patches that aren't upstream yet.
llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
llvm/test/CodeGen/AMDGPU/GlobalISel/divergent-control-flow.ll [new file with mode: 0644]