summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AMDGPU/AMDGPUInstrInfo.td
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2016-06-22 20:15:28 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2016-06-22 20:15:28 +0000
commit9babdf4265fa2991e835880e1a5f808b2c52a73b (patch)
tree323b99af5b331cf3415fe56081ba4b0c743eaefb /llvm/lib/Target/AMDGPU/AMDGPUInstrInfo.td
parentf7f7068109262dda7a17155c59df3948fb2be65b (diff)
downloadbcm5719-llvm-9babdf4265fa2991e835880e1a5f808b2c52a73b.tar.gz
bcm5719-llvm-9babdf4265fa2991e835880e1a5f808b2c52a73b.zip
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. llvm-svn: 273467
Diffstat (limited to 'llvm/lib/Target/AMDGPU/AMDGPUInstrInfo.td')
-rw-r--r--llvm/lib/Target/AMDGPU/AMDGPUInstrInfo.td5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUInstrInfo.td b/llvm/lib/Target/AMDGPU/AMDGPUInstrInfo.td
index a580d805dad..2b13bb9079e 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUInstrInfo.td
+++ b/llvm/lib/Target/AMDGPU/AMDGPUInstrInfo.td
@@ -261,5 +261,8 @@ def IL_brcond : SDNode<"AMDGPUISD::BRANCH_COND", SDTIL_BRCond, [SDNPHasChai
//===----------------------------------------------------------------------===//
// Call/Return DAG Nodes
//===----------------------------------------------------------------------===//
-def IL_retflag : SDNode<"AMDGPUISD::RET_FLAG", SDTNone,
+def AMDGPUendpgm : SDNode<"AMDGPUISD::ENDPGM", SDTNone,
+ [SDNPHasChain, SDNPOptInGlue]>;
+
+def AMDGPUreturn : SDNode<"AMDGPUISD::RETURN", SDTNone,
[SDNPHasChain, SDNPOptInGlue, SDNPVariadic]>;
OpenPOWER on IntegriCloud