[llvm] [AMDGPU][MC] Fix disassemble of image_gather4 with d16 (PR #114609)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 5 03:01:37 PST 2024


================
@@ -235,5 +235,5 @@
 # VI: image_gather4 v[252:255], v1, s[8:15], s[12:15] dmask:0x3 ; encoding: [0x00,0x03,0x00,0xf1,0x01,0xfc,0x62,0x00]
 0x00,0x03,0x00,0xf1,0x01,0xfc,0x62,0x00
 
-# VI: image_gather4 v[252:255], v1, s[8:15], s[12:15] dmask:0x1 unorm glc slc tfe lwe da ; encoding: [0x00,0x71,0x03,0xf3,0x01,0xfc,0x62,0x00]
+# VI: image_gather4 v[252:253], v1, s[8:15], s[12:15] dmask:0x1 unorm glc slc tfe lwe da ; encoding: [0x00,0x71,0x03,0xf3,0x01,0xfc,0x62,0x00]
----------------
jayfoad wrote:

For invalid encodings, I would prefer that we consistently either fail to decode, or print something like `v[252:256] /* VGPR tuple out of range */`. But that would be for another patch.

I have no objection to the current patch if it fixes disassembly of valid encodings.

https://github.com/llvm/llvm-project/pull/114609


More information about the llvm-commits mailing list