summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorDmitry Preobrazhensky <dmitry.preobrazhensky@amd.com>2018-04-11 13:13:30 +0000
committerDmitry Preobrazhensky <dmitry.preobrazhensky@amd.com>2018-04-11 13:13:30 +0000
commitfc715551a35629a00d583274c67e3902b0005b47 (patch)
treea341225a9fecb1cd7064f672fc49a82ff621c1ef /llvm/test
parent6463922e3a9e264199dc83c80824afae05362c1d (diff)
downloadbcm5719-llvm-fc715551a35629a00d583274c67e3902b0005b47.tar.gz
bcm5719-llvm-fc715551a35629a00d583274c67e3902b0005b47.zip
[AMDGPU][MC][GFX9] Added v_screen_partition_4se_b32
See bug 36845: https://bugs.llvm.org/show_bug.cgi?id=36845 Differential Revision: https://reviews.llvm.org/D45443 Reviewers: artem.tamazov, arsenm, timcorringham llvm-svn: 329801
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/MC/AMDGPU/vop1-gfx9.s16
-rw-r--r--llvm/test/MC/AMDGPU/vop3-gfx9.s8
-rw-r--r--llvm/test/MC/AMDGPU/vop_dpp.s5
-rw-r--r--llvm/test/MC/AMDGPU/vop_sdwa.s11
-rw-r--r--llvm/test/MC/Disassembler/AMDGPU/dpp_gfx9.txt4
-rw-r--r--llvm/test/MC/Disassembler/AMDGPU/sdwa_gfx9.txt3
-rw-r--r--llvm/test/MC/Disassembler/AMDGPU/vop1_gfx9.txt6
-rw-r--r--llvm/test/MC/Disassembler/AMDGPU/vop3_gfx9.txt3
8 files changed, 55 insertions, 1 deletions
diff --git a/llvm/test/MC/AMDGPU/vop1-gfx9.s b/llvm/test/MC/AMDGPU/vop1-gfx9.s
index 1102a223ee5..96e328c433b 100644
--- a/llvm/test/MC/AMDGPU/vop1-gfx9.s
+++ b/llvm/test/MC/AMDGPU/vop1-gfx9.s
@@ -39,3 +39,19 @@ v_sat_pk_u8_i16 v5, -1
v_sat_pk_u8_i16 v5, 0x3f717273
// GFX9: v_sat_pk_u8_i16_e32 v5, 0x3f717273 ; encoding: [0xff,0x9e,0x0a,0x7e,0x73,0x72,0x71,0x3f]
// NOVI: error: instruction not supported on this GPU
+
+v_screen_partition_4se_b32 v5, v255
+// GFX9: v_screen_partition_4se_b32_e32 v5, v255 ; encoding: [0xff,0x6f,0x0a,0x7e]
+// NOVI: :1: error: instruction not supported on this GPU
+
+v_screen_partition_4se_b32 v5, s101
+// GFX9: v_screen_partition_4se_b32_e32 v5, s101 ; encoding: [0x65,0x6e,0x0a,0x7e]
+// NOVI: :1: error: instruction not supported on this GPU
+
+v_screen_partition_4se_b32 v5, -1
+// GFX9: v_screen_partition_4se_b32_e32 v5, -1 ; encoding: [0xc1,0x6e,0x0a,0x7e]
+// NOVI: :1: error: instruction not supported on this GPU
+
+v_screen_partition_4se_b32 v5, 0x3f717273
+// GFX9: v_screen_partition_4se_b32_e32 v5, 0x3f717273 ; encoding: [0xff,0x6e,0x0a,0x7e,0x73,0x72,0x71,0x3f]
+// NOVI: :1: error: instruction not supported on this GPU
diff --git a/llvm/test/MC/AMDGPU/vop3-gfx9.s b/llvm/test/MC/AMDGPU/vop3-gfx9.s
index c8c3fa7c1c6..b2324b9c44e 100644
--- a/llvm/test/MC/AMDGPU/vop3-gfx9.s
+++ b/llvm/test/MC/AMDGPU/vop3-gfx9.s
@@ -445,3 +445,11 @@ v_sat_pk_u8_i16_e64 v5, -1
v_sat_pk_u8_i16_e64 v5, v255
// GFX9: v_sat_pk_u8_i16_e64 v5, v255 ; encoding: [0x05,0x00,0x8f,0xd1,0xff,0x01,0x00,0x00]
// NOVI: error: instruction not supported on this GPU
+
+v_screen_partition_4se_b32_e64 v5, v1
+// GXF9: [0x05,0x00,0x77,0xd1,0x01,0x01,0x00,0x00]
+// NOVI: error: instruction not supported on this GPU
+
+v_screen_partition_4se_b32_e64 v5, -1
+// GXF9: [0x05,0x00,0x77,0xd1,0xc1,0x00,0x00,0x00]
+// NOVI: error: instruction not supported on this GPU
diff --git a/llvm/test/MC/AMDGPU/vop_dpp.s b/llvm/test/MC/AMDGPU/vop_dpp.s
index 60dbc24d96f..045f7786a3e 100644
--- a/llvm/test/MC/AMDGPU/vop_dpp.s
+++ b/llvm/test/MC/AMDGPU/vop_dpp.s
@@ -350,6 +350,11 @@ v_cvt_norm_u16_f16_dpp v5, v1 quad_perm:[3,2,1,0] row_mask:0x0 bank_mask:0x0
// NOVI: error
v_sat_pk_u8_i16_dpp v5, v1 row_ror:15 row_mask:0x0 bank_mask:0x0
+// NOSICI: error:
+// NOVI: error:
+// GFX9: v_screen_partition_4se_b32_dpp v5, v1 quad_perm:[0,1,2,3] row_mask:0x0 bank_mask:0x0 bound_ctrl:0 ; encoding: [0xfa,0x6e,0x0a,0x7e,0x01,0xe4,0x08,0x00]
+v_screen_partition_4se_b32_dpp v5, v1 quad_perm:[0,1,2,3] row_mask:0x0 bank_mask:0x0 bound_ctrl:0
+
//===----------------------------------------------------------------------===//
// Check VOP2 opcodes
//===----------------------------------------------------------------------===//
diff --git a/llvm/test/MC/AMDGPU/vop_sdwa.s b/llvm/test/MC/AMDGPU/vop_sdwa.s
index 2a722b0c52c..a2afdf5ac1c 100644
--- a/llvm/test/MC/AMDGPU/vop_sdwa.s
+++ b/llvm/test/MC/AMDGPU/vop_sdwa.s
@@ -1057,4 +1057,13 @@ v_add_f32 v0, v0, v0 mul:2 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:WORD_1 s
// NOSICI: error:
// NOVI: error:
// GFX9: v_add_f32_sdwa v0, v0, v0 clamp div:2 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:WORD_1 src1_sel:BYTE_2 ; encoding: [0xf9,0x00,0x00,0x02,0x00,0xe6,0x05,0x02]
-v_add_f32 v0, v0, v0 clamp div:2 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:WORD_1 src1_sel:BYTE_2 \ No newline at end of file
+v_add_f32 v0, v0, v0 clamp div:2 dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:WORD_1 src1_sel:BYTE_2
+
+//---------------------------------------------------------------------------//
+// Check Instructions
+//---------------------------------------------------------------------------//
+
+// NOSICI: error:
+// NOVI: error:
+// GFX9: v_screen_partition_4se_b32_sdwa v5, v1 dst_sel:DWORD dst_unused:UNUSED_PRESERVE src0_sel:BYTE_0 ; encoding: [0xf9,0x6e,0x0a,0x7e,0x01,0x16,0x00,0x00]
+v_screen_partition_4se_b32_sdwa v5, v1 src0_sel:BYTE_0
diff --git a/llvm/test/MC/Disassembler/AMDGPU/dpp_gfx9.txt b/llvm/test/MC/Disassembler/AMDGPU/dpp_gfx9.txt
new file mode 100644
index 00000000000..808f41d7ecb
--- /dev/null
+++ b/llvm/test/MC/Disassembler/AMDGPU/dpp_gfx9.txt
@@ -0,0 +1,4 @@
+# RUN: llvm-mc -arch=amdgcn -mcpu=gfx900 -disassemble -show-encoding < %s | FileCheck %s -check-prefix=GFX9
+
+# GFX9: v_screen_partition_4se_b32_dpp v5, v1 quad_perm:[0,1,2,3] row_mask:0x0 bank_mask:0xf ; encoding: [0xfa,0x6e,0x0a,0x7e,0x01,0xe4,0x00,0x0f]
+0xfa,0x6e,0x0a,0x7e,0x01,0xe4,0x00,0x0f
diff --git a/llvm/test/MC/Disassembler/AMDGPU/sdwa_gfx9.txt b/llvm/test/MC/Disassembler/AMDGPU/sdwa_gfx9.txt
index 47226d344c2..6ab0bee4aa8 100644
--- a/llvm/test/MC/Disassembler/AMDGPU/sdwa_gfx9.txt
+++ b/llvm/test/MC/Disassembler/AMDGPU/sdwa_gfx9.txt
@@ -242,6 +242,9 @@
# GFX9: v_sat_pk_u8_i16_sdwa v5, sext(v1) dst_sel:DWORD dst_unused:UNUSED_PAD src0_sel:DWORD ; encoding: [0xf9,0x9e,0x0a,0x7e,0x01,0x06,0x0e,0x00]
0xf9,0x9e,0x0a,0x7e,0x01,0x06,0x0e,0x00
+# GFX9: v_screen_partition_4se_b32_sdwa v5, v1 dst_sel:DWORD dst_unused:UNUSED_PRESERVE src0_sel:BYTE_0 ; encoding: [0xf9,0x6e,0x0a,0x7e,0x01,0x16,0x00,0x00]
+0xf9 0x6e 0x0a 0x7e 0x01 0x16 0x00 0x00
+
#-----------------------------------------------------------------------------#
# VOP2
#-----------------------------------------------------------------------------#
diff --git a/llvm/test/MC/Disassembler/AMDGPU/vop1_gfx9.txt b/llvm/test/MC/Disassembler/AMDGPU/vop1_gfx9.txt
index fb051af75cf..99dec7af79b 100644
--- a/llvm/test/MC/Disassembler/AMDGPU/vop1_gfx9.txt
+++ b/llvm/test/MC/Disassembler/AMDGPU/vop1_gfx9.txt
@@ -23,3 +23,9 @@
# GFX9: v_sat_pk_u8_i16_e32 v5, 0x3f717273 ; encoding: [0xff,0x9e,0x0a,0x7e,0x73,0x72,0x71,0x3f]
0xff,0x9e,0x0a,0x7e,0x73,0x72,0x71,0x3f
+
+# GFX9: v_screen_partition_4se_b32_e32 v5, s101 ; encoding: [0x65,0x6e,0x0a,0x7e]
+0x65,0x6e,0x0a,0x7e
+
+# GFX9: v_screen_partition_4se_b32_e32 v5, 0x3f717273 ; encoding: [0xff,0x6e,0x0a,0x7e,0x73,0x72,0x71,0x3f]
+0xff,0x6e,0x0a,0x7e,0x73,0x72,0x71,0x3f
diff --git a/llvm/test/MC/Disassembler/AMDGPU/vop3_gfx9.txt b/llvm/test/MC/Disassembler/AMDGPU/vop3_gfx9.txt
index 50b5967c493..e949b080be6 100644
--- a/llvm/test/MC/Disassembler/AMDGPU/vop3_gfx9.txt
+++ b/llvm/test/MC/Disassembler/AMDGPU/vop3_gfx9.txt
@@ -692,3 +692,6 @@
# GFX9: v_sat_pk_u8_i16_e64 v255, v1 ; encoding: [0xff,0x00,0x8f,0xd1,0x01,0x01,0x00,0x00]
0xff,0x00,0x8f,0xd1,0x01,0x01,0x00,0x00
+
+# GXF9: v_screen_partition_4se_b32_e64 v5, v1 ; encoding: [0x05,0x00,0x77,0xd1,0x01,0x01,0x00,0x00]
+0x05,0x00,0x77,0xd1,0x01,0x01,0x00,0x00
OpenPOWER on IntegriCloud