[PATCH] D45313: [AMDGPU][MC][GFX9] Added instruction s_endpgm_ordered_ps_done
Phabricator via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 6 10:28:01 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL329430: [AMDGPU][MC][GFX9] Added instruction s_endpgm_ordered_ps_done (authored by dpreobra, committed by ).
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D45313?vs=141117&id=141377#toc
Repository:
rL LLVM
https://reviews.llvm.org/D45313
Files:
llvm/trunk/lib/Target/AMDGPU/SOPInstructions.td
llvm/trunk/test/MC/AMDGPU/sopk.s
llvm/trunk/test/MC/Disassembler/AMDGPU/sopk_gfx9.txt
Index: llvm/trunk/test/MC/Disassembler/AMDGPU/sopk_gfx9.txt
===================================================================
--- llvm/trunk/test/MC/Disassembler/AMDGPU/sopk_gfx9.txt
+++ llvm/trunk/test/MC/Disassembler/AMDGPU/sopk_gfx9.txt
@@ -0,0 +1,4 @@
+# RUN: llvm-mc -arch=amdgcn -mcpu=gfx900 -disassemble -show-encoding < %s | FileCheck %s -check-prefix=GFX9
+
+# GFX9: s_endpgm_ordered_ps_done ; encoding: [0x00,0x00,0x9e,0xbf]
+0x00,0x00,0x9e,0xbf
Index: llvm/trunk/test/MC/AMDGPU/sopk.s
===================================================================
--- llvm/trunk/test/MC/AMDGPU/sopk.s
+++ llvm/trunk/test/MC/AMDGPU/sopk.s
@@ -1,8 +1,12 @@
-// RUN: llvm-mc -arch=amdgcn -show-encoding %s | FileCheck --check-prefix=GCN --check-prefix=SICI %s
-// RUN: llvm-mc -arch=amdgcn -mcpu=tahiti -show-encoding %s | FileCheck --check-prefix=GCN --check-prefix=SICI %s
-// RUN: llvm-mc -arch=amdgcn -mcpu=fiji -show-encoding %s | FileCheck --check-prefix=GCN --check-prefix=VI9 --check-prefix=VI %s
+// RUN: not llvm-mc -arch=amdgcn -show-encoding %s | FileCheck --check-prefix=GCN --check-prefix=SICI %s
+// RUN: not llvm-mc -arch=amdgcn -mcpu=tahiti -show-encoding %s | FileCheck --check-prefix=GCN --check-prefix=SICI %s
+// RUN: not llvm-mc -arch=amdgcn -mcpu=fiji -show-encoding %s | FileCheck --check-prefix=GCN --check-prefix=VI9 --check-prefix=VI %s
// RUN: llvm-mc -arch=amdgcn -mcpu=gfx900 -show-encoding %s | FileCheck --check-prefix=GCN --check-prefix=VI9 --check-prefix=GFX9 %s
+// RUN: not llvm-mc -arch=amdgcn %s 2>&1 | FileCheck -check-prefix=NOSICIVI %s
+// RUN: not llvm-mc -arch=amdgcn -mcpu=tahiti %s 2>&1 | FileCheck -check-prefix=NOSICIVI -check-prefix=NOSI %s
+// RUN: not llvm-mc -arch=amdgcn -mcpu=fiji %s 2>&1 | FileCheck -check-prefix=NOSICIVI -check-prefix=NOVI %s
+
//===----------------------------------------------------------------------===//
// Instructions
//===----------------------------------------------------------------------===//
@@ -167,3 +171,7 @@
s_setreg_imm32_b32 hwreg(HW_REG_GPR_ALLOC, 1, 31), 0xff
// SICI: s_setreg_imm32_b32 hwreg(HW_REG_GPR_ALLOC, 1, 31), 0xff ; encoding: [0x45,0xf0,0x80,0xba,0xff,0x00,0x00,0x00]
// VI9: s_setreg_imm32_b32 hwreg(HW_REG_GPR_ALLOC, 1, 31), 0xff ; encoding: [0x45,0xf0,0x00,0xba,0xff,0x00,0x00,0x00]
+
+s_endpgm_ordered_ps_done
+// GFX9: s_endpgm_ordered_ps_done ; encoding: [0x00,0x00,0x9e,0xbf]
+// NOSICIVI: error: instruction not supported on this GPU
Index: llvm/trunk/lib/Target/AMDGPU/SOPInstructions.td
===================================================================
--- llvm/trunk/lib/Target/AMDGPU/SOPInstructions.td
+++ llvm/trunk/lib/Target/AMDGPU/SOPInstructions.td
@@ -819,6 +819,13 @@
}
}
+let SubtargetPredicate = isGFX9 in {
+ let isBarrier = 1, isReturn = 1, simm16 = 0 in {
+ def S_ENDPGM_ORDERED_PS_DONE :
+ SOPP<0x01e, (ins), "s_endpgm_ordered_ps_done">;
+ } // End isBarrier = 1, isReturn = 1, simm16 = 0
+} // End SubtargetPredicate = isGFX9
+
let isBranch = 1, SchedRW = [WriteBranch] in {
def S_BRANCH : SOPP <
0x00000002, (ins sopp_brtarget:$simm16), "s_branch $simm16",
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45313.141377.patch
Type: text/x-patch
Size: 3125 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180406/e4ced301/attachment.bin>
More information about the llvm-commits
mailing list