mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
[AMDGPU][MC][GFX10] Enabled null for 64-bit dst operands
See https://bugs.llvm.org/show_bug.cgi?id=43524 Reviewers: arsenm, rampitec Differential Revision: https://reviews.llvm.org/D68785 llvm-svn: 374557
This commit is contained in:
parent
b8e41d5f26
commit
0476005a62
@ -290,6 +290,10 @@ public:
|
||||
return isOff() || isVReg32();
|
||||
}
|
||||
|
||||
bool isNull() const {
|
||||
return isRegKind() && getReg() == AMDGPU::SGPR_NULL;
|
||||
}
|
||||
|
||||
bool isSDWAOperand(MVT type) const;
|
||||
bool isSDWAFP16Operand() const;
|
||||
bool isSDWAFP32Operand() const;
|
||||
@ -6976,6 +6980,14 @@ unsigned AMDGPUAsmParser::validateTargetOperandClass(MCParsedAsmOperand &Op,
|
||||
return Operand.isInterpAttr() ? Match_Success : Match_InvalidOperand;
|
||||
case MCK_AttrChan:
|
||||
return Operand.isAttrChan() ? Match_Success : Match_InvalidOperand;
|
||||
case MCK_SReg_64:
|
||||
case MCK_SReg_64_XEXEC:
|
||||
// Null is defined as a 32-bit register but
|
||||
// it should also be enabled with 64-bit operands.
|
||||
// The following code enables it for SReg_64 operands
|
||||
// used as source and destination. Remaining source
|
||||
// operands are handled in isInlinableImm.
|
||||
return Operand.isNull() ? Match_Success : Match_InvalidOperand;
|
||||
default:
|
||||
return Match_InvalidOperand;
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
// RUN: not llvm-mc -arch=amdgcn -show-encoding %s | FileCheck --check-prefix=GCN --check-prefix=SICI %s
|
||||
// RUN: not llvm-mc -arch=amdgcn -mcpu=fiji -show-encoding %s 2>&1 | FileCheck --check-prefix=GCN --check-prefix=VI --check-prefix=GFX89 %s
|
||||
// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx900 -show-encoding %s 2>&1 | FileCheck --check-prefix=GCN --check-prefix=GFX89 --check-prefix=GFX9 %s
|
||||
// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx1010 -show-encoding %s 2>&1 | FileCheck --check-prefix=GCN --check-prefix=GFX10 %s
|
||||
|
||||
// RUN: not llvm-mc -arch=amdgcn -show-encoding %s 2>&1 | FileCheck --check-prefix=NOSICI --check-prefix=NOSICIVI %s
|
||||
// RUN: not llvm-mc -arch=amdgcn -mcpu=fiji -show-encoding %s 2>&1 | FileCheck --check-prefix=NOVI --check-prefix=NOSICIVI --check-prefix=NOGFX89 %s
|
||||
@ -34,6 +35,10 @@ s_mov_b64 s[2:3], s[4:5]
|
||||
// SICI: s_mov_b64 s[2:3], s[4:5] ; encoding: [0x04,0x04,0x82,0xbe]
|
||||
// GFX89: s_mov_b64 s[2:3], s[4:5] ; encoding: [0x04,0x01,0x82,0xbe]
|
||||
|
||||
s_mov_b64 null, s[4:5]
|
||||
// GFX10: s_mov_b64 null, s[4:5] ; encoding: [0x04,0x04,0xfd,0xbe]
|
||||
// NOSICIVI: error: not a valid operand.
|
||||
|
||||
s_mov_b64 s[2:3], 0xffffffffffffffff
|
||||
// SICI: s_mov_b64 s[2:3], -1 ; encoding: [0xc1,0x04,0x82,0xbe]
|
||||
// GFX89: s_mov_b64 s[2:3], -1 ; encoding: [0xc1,0x01,0x82,0xbe]
|
||||
|
@ -3,6 +3,7 @@
|
||||
// RUN: not llvm-mc -arch=amdgcn -mcpu=bonaire -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=GFX89 %s
|
||||
// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx900 -show-encoding %s | FileCheck --check-prefix=GCN --check-prefix=GFX89 --check-prefix=GFX9 %s
|
||||
// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx1010 -show-encoding %s | FileCheck --check-prefix=GCN --check-prefix=GFX10 %s
|
||||
|
||||
// RUN: not llvm-mc -arch=amdgcn -show-encoding %s 2>&1 | FileCheck --check-prefix=NOSICIVI %s
|
||||
// RUN: not llvm-mc -arch=amdgcn -mcpu=tahiti -show-encoding %s 2>&1 | FileCheck --check-prefix=NOSICIVI %s
|
||||
@ -60,6 +61,10 @@ s_and_b32 s2, 0xFFFF0000, -65536
|
||||
// SICI: s_and_b32 s2, 0xffff0000, 0xffff0000 ; encoding: [0xff,0xff,0x02,0x87,0x00,0x00,0xff,0xff]
|
||||
// GFX89: s_and_b32 s2, 0xffff0000, 0xffff0000 ; encoding: [0xff,0xff,0x02,0x86,0x00,0x00,0xff,0xff]
|
||||
|
||||
s_and_b64 null, s[4:5], s[6:7]
|
||||
// GFX10: s_and_b64 null, s[4:5], s[6:7] ; encoding: [0x04,0x06,0xfd,0x87]
|
||||
// NOSICIVI: error: not a valid operand.
|
||||
|
||||
s_and_b64 s[2:3], s[4:5], s[6:7]
|
||||
// SICI: s_and_b64 s[2:3], s[4:5], s[6:7] ; encoding: [0x04,0x06,0x82,0x87]
|
||||
// GFX89: s_and_b64 s[2:3], s[4:5], s[6:7] ; encoding: [0x04,0x06,0x82,0x86]
|
||||
|
@ -1,12 +1,13 @@
|
||||
// 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 -mcpu=gfx900 -show-encoding %s | FileCheck --check-prefix=GCN --check-prefix=VI9 --check-prefix=GFX9 %s
|
||||
// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx1010 -show-encoding %s | FileCheck --check-prefix=GCN --check-prefix=GFX10 %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
|
||||
// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx900 %s 2>&1 | FileCheck --check-prefix=NOGFX9 %s
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Instructions
|
||||
@ -319,6 +320,11 @@ s_endpgm_ordered_ps_done
|
||||
// GFX9: s_endpgm_ordered_ps_done ; encoding: [0x00,0x00,0x9e,0xbf]
|
||||
// NOSICIVI: error: instruction not supported on this GPU
|
||||
|
||||
s_call_b64 null, 12609
|
||||
// GFX10: s_call_b64 null, 12609 ; encoding: [0x41,0x31,0x7d,0xbb]
|
||||
// NOSICIVI: error: not a valid operand.
|
||||
// NOGFX9: error: not a valid operand.
|
||||
|
||||
s_call_b64 s[12:13], 12609
|
||||
// GFX9: s_call_b64 s[12:13], 12609 ; encoding: [0x41,0x31,0x8c,0xba]
|
||||
// NOSICIVI: error: instruction not supported on this GPU
|
||||
|
@ -8978,6 +8978,9 @@
|
||||
# GFX10: s_and_b32 vcc_lo, s1, s2 ; encoding: [0x01,0x02,0x6a,0x87]
|
||||
0x01,0x02,0x6a,0x87
|
||||
|
||||
# GFX10: s_and_b64 null, s[4:5], s[6:7] ; encoding: [0x04,0x06,0xfd,0x87]
|
||||
0x04,0x06,0xfd,0x87
|
||||
|
||||
# GFX10: s_and_b64 exec, s[2:3], s[4:5] ; encoding: [0x02,0x04,0xfe,0x87]
|
||||
0x02,0x04,0xfe,0x87
|
||||
|
||||
@ -11693,6 +11696,9 @@
|
||||
# GFX10: s_buffer_store_dwordx4 s[96:99], s[8:11], s0 ; encoding: [0x04,0x18,0x68,0xf4,0x00,0x00,0x00,0x00]
|
||||
0x04,0x18,0x68,0xf4,0x00,0x00,0x00,0x00
|
||||
|
||||
# GFX10: s_call_b64 null, 12609 ; encoding: [0x41,0x31,0x7d,0xbb]
|
||||
0x41,0x31,0x7d,0xbb
|
||||
|
||||
# GFX10: s_call_b64 exec, 4660 ; encoding: [0x34,0x12,0x7e,0xbb]
|
||||
0x34,0x12,0x7e,0xbb
|
||||
|
||||
@ -15665,6 +15671,9 @@
|
||||
# GFX10: s_mov_b32 vcc_lo, s1 ; encoding: [0x01,0x03,0xea,0xbe]
|
||||
0x01,0x03,0xea,0xbe
|
||||
|
||||
# GFX10: s_mov_b64 null, s[4:5] ; encoding: [0x04,0x04,0xfd,0xbe]
|
||||
0x04,0x04,0xfd,0xbe
|
||||
|
||||
# GFX10: s_mov_b64 exec, s[2:3] ; encoding: [0x02,0x04,0xfe,0xbe]
|
||||
0x02,0x04,0xfe,0xbe
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user