[AMDGPU] Ignore unused bits in VINTERP encoding
authorJay Foad <jay.foad@amd.com>
Thu, 9 Feb 2023 10:15:10 +0000 (10:15 +0000)
committerJay Foad <jay.foad@amd.com>
Thu, 9 Feb 2023 10:43:28 +0000 (10:43 +0000)
In the GFX11 VINTERP encoding bits 23, 59 and 60 are unused. Change the
disassembler to ignore these bits.

Differential Revision: https://reviews.llvm.org/D143633

llvm/lib/Target/AMDGPU/VINTERPInstructions.td
llvm/test/MC/Disassembler/AMDGPU/gfx11_dasm_vinterp.txt

index 71de202..7d03150 100644 (file)
@@ -23,7 +23,6 @@ class VINTERPe_gfx11 <bits<7> op, VOPProfile P> : Enc64 {
 
   let Inst{31-26} = 0x33; // VOP3P encoding
   let Inst{25-24} = 0x1; // VINTERP sub-encoding
-  let Inst{23}    = 0; // reserved
 
   let Inst{7-0}   = vdst;
   let Inst{10-8}  = waitexp;
index a1532bf..a0b098d 100644 (file)
@@ -3,6 +3,10 @@
 # GFX11: v_interp_p10_f32 v0, v1, v2, v3{{$}}
 0x00,0x00,0x00,0xcd,0x01,0x05,0x0e,0x04
 
+# Check that unused bits in the encoding are ignored.
+# GFX11: v_interp_p10_f32 v0, v1, v2, v3{{$}}
+0x00,0x00,0x80,0xcd,0x01,0x05,0x0e,0x1c
+
 # GFX11: v_interp_p10_f32 v1, v10, v20, v30{{$}}
 0x01,0x00,0x00,0xcd,0x0a,0x29,0x7a,0x04