From: Tom Stellard Date: Fri, 17 Aug 2012 19:07:37 +0000 (+0000) Subject: radeon/llvm: Lower RETFLAG DAG Node to S_ENDPGM on SI X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3f9b6aa0f467b8d918ce277697db2f42abe1cf4c;p=mesa.git radeon/llvm: Lower RETFLAG DAG Node to S_ENDPGM on SI --- diff --git a/src/gallium/drivers/radeon/AMDILInstrInfo.td b/src/gallium/drivers/radeon/AMDILInstrInfo.td index b683e49ea81..779566d4bf3 100644 --- a/src/gallium/drivers/radeon/AMDILInstrInfo.td +++ b/src/gallium/drivers/radeon/AMDILInstrInfo.td @@ -223,13 +223,6 @@ let isTerminator = 1, usesCustomInserter = 1 in { [(br bb:$target)]>; defm BRANCH_COND : BranchConditional; } -//===---------------------------------------------------------------------===// -// return instructions -//===---------------------------------------------------------------------===// -let isTerminator = 1, isReturn = 1, isBarrier = 1, hasCtrlDep = 1 in { - def RETURN : ILFormat<(outs), (ins variable_ops), - "RETURN", [(IL_retflag)]>; -} //===---------------------------------------------------------------------===// // Flow and Program control Instructions diff --git a/src/gallium/drivers/radeon/R600Instructions.td b/src/gallium/drivers/radeon/R600Instructions.td index 9651b85a36d..84f839e77ba 100644 --- a/src/gallium/drivers/radeon/R600Instructions.td +++ b/src/gallium/drivers/radeon/R600Instructions.td @@ -1213,6 +1213,14 @@ def MASK_WRITE : AMDGPUShaderInst < } // End usesCustomInserter = 1 +//===---------------------------------------------------------------------===// +// return instruction +//===---------------------------------------------------------------------===// +let isTerminator = 1, isReturn = 1, isBarrier = 1, hasCtrlDep = 1 in { + def RETURN : ILFormat<(outs), (ins variable_ops), + "RETURN", [(IL_retflag)]>; +} + //===----------------------------------------------------------------------===// // ISel Patterns //===----------------------------------------------------------------------===// diff --git a/src/gallium/drivers/radeon/SIInstructions.td b/src/gallium/drivers/radeon/SIInstructions.td index 152d7356a91..f09d6042457 100644 --- a/src/gallium/drivers/radeon/SIInstructions.td +++ b/src/gallium/drivers/radeon/SIInstructions.td @@ -595,8 +595,11 @@ def V_INTERP_MOV_F32 : VINTRP < let isTerminator = 1 in { -def S_ENDPGM : SOPP <0x00000001, (ins), "S_ENDPGM", []> { +def S_ENDPGM : SOPP <0x00000001, (ins), "S_ENDPGM", + [(IL_retflag)]> { let SIMM16 = 0; + let isBarrier = 1; + let hasCtrlDep = 1; } let isBranch = 1 in {