radeon/llvm: Lower RETFLAG DAG Node to S_ENDPGM on SI
authorTom Stellard <thomas.stellard@amd.com>
Fri, 17 Aug 2012 19:07:37 +0000 (19:07 +0000)
committerTom Stellard <thomas.stellard@amd.com>
Thu, 23 Aug 2012 15:00:48 +0000 (15:00 +0000)
src/gallium/drivers/radeon/AMDILInstrInfo.td
src/gallium/drivers/radeon/R600Instructions.td
src/gallium/drivers/radeon/SIInstructions.td

index b683e49ea8170adf3ff04947b3ca1fdba1806b8a..779566d4bf37a366e58249e6ba1482947d3e5a73 100644 (file)
@@ -223,13 +223,6 @@ let isTerminator = 1, usesCustomInserter = 1 in {
       [(br bb:$target)]>;
   defm BRANCH_COND : BranchConditional<IL_brcond>;
 }
-//===---------------------------------------------------------------------===//
-// 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
index 9651b85a36db51173e8a3fe3b4f22938683514b4..84f839e77bafef51b314248287f66483d7466813 100644 (file)
@@ -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
 //===----------------------------------------------------------------------===//
index 152d7356a91af93cfb0340d7f9673044ff068100..f09d6042457f96537c48eae9e231052eb7e03fe1 100644 (file)
@@ -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 {