[PATCH] D125907: [AMDGPU][MC][GFX8+] Correct SMEM offset parsing
Dmitry Preobrazhensky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 20 04:01:04 PDT 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rGf598dfb3bf8c: [AMDGPU][MC][GFX8+] Correct SMEM offset parsing (authored by dp).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125907/new/
https://reviews.llvm.org/D125907
Files:
llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
llvm/test/MC/AMDGPU/gfx10_asm_smem.s
llvm/test/MC/AMDGPU/gfx8_asm_smem.s
llvm/test/MC/AMDGPU/gfx9_asm_smem.s
Index: llvm/test/MC/AMDGPU/gfx9_asm_smem.s
===================================================================
--- llvm/test/MC/AMDGPU/gfx9_asm_smem.s
+++ llvm/test/MC/AMDGPU/gfx9_asm_smem.s
@@ -4475,3 +4475,6 @@
s_atomic_dec_x2 s[10:11], s[2:3], s0 glc
// CHECK: [0x81,0x02,0xb1,0xc2,0x00,0x00,0x00,0x00]
+
+s_load_dword s1, s[2:3] glc
+// CHECK: s_load_dword s1, s[2:3], 0x0 glc ; encoding: [0x41,0x00,0x03,0xc0,0x00,0x00,0x00,0x00]
Index: llvm/test/MC/AMDGPU/gfx8_asm_smem.s
===================================================================
--- llvm/test/MC/AMDGPU/gfx8_asm_smem.s
+++ llvm/test/MC/AMDGPU/gfx8_asm_smem.s
@@ -1163,3 +1163,6 @@
s_atc_probe_buffer 0x0, s[8:11], 0x7ffff
// CHECK: [0x04,0x00,0x9e,0xc0,0xff,0xff,0x07,0x00]
+
+s_load_dword s1, s[2:3] glc
+// CHECK: s_load_dword s1, s[2:3], 0x0 glc ; encoding: [0x41,0x00,0x03,0xc0,0x00,0x00,0x00,0x00]
Index: llvm/test/MC/AMDGPU/gfx10_asm_smem.s
===================================================================
--- llvm/test/MC/AMDGPU/gfx10_asm_smem.s
+++ llvm/test/MC/AMDGPU/gfx10_asm_smem.s
@@ -1342,3 +1342,9 @@
s_buffer_atomic_xor s5, s[4:7], s2 dlc
// GFX10: encoding: [0x42,0x41,0x28,0xf5,0x00,0x00,0x00,0x04]
+
+s_load_dword s1, s[2:3] glc
+// GFX10: s_load_dword s1, s[2:3], 0x0 glc ; encoding: [0x41,0x00,0x01,0xf4,0x00,0x00,0x00,0xfa]
+
+s_load_dword s1, s[2:3] dlc
+// GFX10: s_load_dword s1, s[2:3], 0x0 dlc ; encoding: [0x41,0x40,0x00,0xf4,0x00,0x00,0x00,0xfa]
Index: llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
+++ llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
@@ -7736,7 +7736,8 @@
}
bool AMDGPUOperand::isSMEMOffset() const {
- return isImm(); // Offset range is checked later by validator.
+ return isImmTy(ImmTyNone) ||
+ isImmTy(ImmTyOffset); // Offset range is checked later by validator.
}
bool AMDGPUOperand::isSMRDLiteralOffset() const {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125907.430937.patch
Type: text/x-patch
Size: 2003 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220520/5f93baf3/attachment.bin>
More information about the llvm-commits
mailing list