[llvm] [AMDGPU] Fix encoding of VOP3P dpp on GFX11 and GFX12 (PR #82710)

Stanislav Mekhanoshin via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 23 02:32:31 PST 2024


================
@@ -2,10 +2,10 @@
 // RUN: llvm-mc -triple=amdgcn -mcpu=gfx1100 -mattr=-wavefrontsize32,+wavefrontsize64 -show-encoding %s | FileCheck --check-prefixes=GFX11 %s
 
 v_dot2_f32_f16 v0, v1, v2, v3 neg_lo:[0,0,0] neg_hi:[0,0,0] quad_perm:[2,2,3,1] bound_ctrl:0 fi:1
-// GFX11: v_dot2_f32_f16_e64_dpp v0, v1, v2, v3 quad_perm:[2,2,3,1] row_mask:0xf bank_mask:0xf fi:1 ; encoding: [0x00,0x00,0x13,0xcc,0xfa,0x04,0x0e,0x04,0x01,0x7a,0x04,0xff]
+// GFX11: v_dot2_f32_f16_e64_dpp v0, v1, v2, v3 quad_perm:[2,2,3,1] row_mask:0xf bank_mask:0xf fi:1 ; encoding: [0x00,0x40,0x13,0xcc,0xfa,0x04,0x0e,0x1c,0x01,0x7a,0x04,0xff]
----------------
rampitec wrote:

And this is the decode of what llvm-mc has produced before the patch out of these bits:
```
Decode:
    v_dot2_f32_f16  v0, sel_lo(v1), sel_lo(v2), sel_lo(v3) quad_perm:[2,2,3,1] fi:1 // 000000000000: CC130000 040E04FA 
    FF047A01

Fields:
    CLAMP                   0x0  ENC_VOP3P[ 15: 15] 
    COMP_OP_SEL_HI          0x1  ENC_VOP3P[ -1: -1] 
    ENCODING               0xcc  ENC_VOP3P[ 31: 24] 
    NEG                     0x0  ENC_VOP3P[ 63: 61] 
    NEG_HI                  0x0  ENC_VOP3P[ 10:  8] 
    OP                     0x13  ENC_VOP3P[ 22: 16] 
    OP_SEL                  0x0  ENC_VOP3P[ 13: 11] 
    OP_SEL_HI               0x0  ENC_VOP3P[ 60: 59] 
    OP_SEL_HI_2             0x0  ENC_VOP3P[ 14: 14] 
    SRC0                   0xfa  ENC_VOP3P[ 40: 32] 
    SRC1                  0x102  ENC_VOP3P[ 49: 41] 
    SRC2                  0x103  ENC_VOP3P[ 58: 50] 
    VDST                    0x0  ENC_VOP3P[  7:  0] 
```

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


More information about the llvm-commits mailing list