OSDN Git Service

AMDGPU: Fix verifier errors in SILowerControlFlow
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Wed, 22 Jun 2016 20:15:28 +0000 (20:15 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Wed, 22 Jun 2016 20:15:28 +0000 (20:15 +0000)
commite22857013f948a562a4f966756b59a04a41ba4d4
treeae9168e0628eeadadb74ed19e6db7f848c403756
parentc7a10fc5eda26dc92f13a86a5a28fed522c56065
AMDGPU: Fix verifier errors in SILowerControlFlow

The main sin this was committing was using terminator
instructions in the middle of the block, and then
not updating the block successors / predecessors.
Split the blocks up to avoid this and introduce new
pseudo instructions for branches taken with exec masking.

Also use a pseudo instead of emitting s_endpgm and erasing
it in the special case of a non-void return.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273467 91177308-0d34-0410-b5e6-96231b3b80d8
13 files changed:
lib/Target/AMDGPU/AMDGPUISelLowering.cpp
lib/Target/AMDGPU/AMDGPUISelLowering.h
lib/Target/AMDGPU/AMDGPUInstrInfo.td
lib/Target/AMDGPU/AMDGPUMCInstLower.cpp
lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
lib/Target/AMDGPU/R600Instructions.td
lib/Target/AMDGPU/SIISelLowering.cpp
lib/Target/AMDGPU/SIInstrFormats.td
lib/Target/AMDGPU/SIInstructions.td
lib/Target/AMDGPU/SILowerControlFlow.cpp
test/CodeGen/AMDGPU/indirect-addressing-si.ll
test/CodeGen/AMDGPU/ret_jump.ll
test/CodeGen/AMDGPU/wqm.ll