brintos

brintos / llvm-project-archived public Read only

0
0
Text · 8.1 KiB · c442800 Raw
181 lines · plain
1// RUN: llvm-mc -triple=amdgcn -mcpu=gfx1100 -show-encoding %s | FileCheck -check-prefix=GFX11 %s2 3//===----------------------------------------------------------------------===//4// A VOPD instruction can use one or more literals,5// provided that they are identical.6//===----------------------------------------------------------------------===//7 8// LITERAL9 10v_dual_mul_f32      v11, v1, v2                  ::  v_dual_mul_f32      v10, 0x24681357, v511// GFX11: encoding: [0x01,0x05,0xc6,0xc8,0xff,0x0a,0x0a,0x0b,0x57,0x13,0x68,0x24]12 13// LITERAL*214 15v_dual_mul_f32      v11, 0x24681357, v2          ::  v_dual_mul_f32      v10, 0x24681357, v516// GFX11: encoding: [0xff,0x04,0xc6,0xc8,0xff,0x0a,0x0a,0x0b,0x57,0x13,0x68,0x24]17 18// LITERAL*2 (this is an unclear case because literals have different size, but SP3 accepts this code)19 20v_dual_add_f32      v6, 0xfe0b, v5               ::  v_dual_dot2acc_f32_f16  v255, 0xfe0b, v421// GFX11: encoding: [0xff,0x0a,0x18,0xc9,0xff,0x08,0xfe,0x06,0x0b,0xfe,0x00,0x00]22 23// LITERAL + KIMM24 25v_dual_add_f32      v5, 0xaf123456, v2           ::  v_dual_fmaak_f32     v6, v3, v1, 0xaf123456 ;26// GFX11: encoding: [0xff,0x04,0x02,0xc9,0x03,0x03,0x06,0x05,0x56,0x34,0x12,0xaf]27 28// KIMM + LITERAL29 30v_dual_fmamk_f32    v122, v74, 0xa0172923, v161  ::  v_dual_lshlrev_b32   v247, 0xa0172923, v9931// GFX11: encoding: [0x4a,0x43,0xa3,0xc8,0xff,0xc6,0xf6,0x7a,0x23,0x29,0x17,0xa0]32 33// KIMM + LITERAL (this is an unclear case because literals have different size, but SP3 accepts this code)34 35v_dual_fmamk_f32    v122, v74, 0xfe0b, v162      ::  v_dual_dot2acc_f32_f16  v247, 0xfe0b, v9936// GFX11: encoding: [0x4a,0x45,0x99,0xc8,0xff,0xc6,0xf6,0x7a,0x0b,0xfe,0x00,0x00]37 38// KIMM*239 40v_dual_fmamk_f32    v122, 0xdeadbeef, 0xdeadbeef, v161 ::  v_dual_fmamk_f32  v123, 0xdeadbeef, 0xdeadbeef, v16241// GFX11: encoding: [0xff,0x42,0x85,0xc8,0xff,0x44,0x7b,0x7a,0xef,0xbe,0xad,0xde]42 43//===----------------------------------------------------------------------===//44// A VOPD instruction can use 2 scalar operands,45// but implicit VCC must be counted in.46//===----------------------------------------------------------------------===//47 48// 2 different SGPRs49 50v_dual_mul_f32      v0, s1, v2                   ::  v_dual_mul_f32       v3, s4, v551// GFX11: encoding: [0x01,0x04,0xc6,0xc8,0x04,0x0a,0x02,0x00]52 53// SGPR + LITERAL54 55v_dual_fmaak_f32    v122, s74, v161, 2.741       ::  v_dual_and_b32       v247, v160, v9856// GFX11: encoding: [0x4a,0x42,0x65,0xc8,0xa0,0xc5,0xf6,0x7a,0x8b,0x6c,0x2f,0x40]57 58v_dual_mov_b32      v247, v160                   ::  v_dual_fmaak_f32     v122, s74, v161, 2.74159// GFX11: encoding: [0xa0,0x01,0x02,0xca,0x4a,0x42,0x7b,0xf7,0x8b,0x6c,0x2f,0x40]60 61// SGPR*2 + LITERAL62 63v_dual_fmaak_f32    v122, s74, v161, 2.741       ::  v_dual_and_b32       v247, s74, v9864// GFX11: encoding: [0x4a,0x42,0x65,0xc8,0x4a,0xc4,0xf6,0x7a,0x8b,0x6c,0x2f,0x40]65 66// SGPR + LITERAL*267 68v_dual_fmaak_f32    v122, s74, v161, 2.741       ::  v_dual_fmamk_f32     v3, v6, 2.741, v169// GFX11: encoding: [0x4a,0x42,0x45,0xc8,0x06,0x03,0x02,0x7a,0x8b,0x6c,0x2f,0x40]70 71// SGPR*2 + LITERAL*272 73v_dual_fmaak_f32    v122, s74, v161, 2.741       ::  v_dual_fmamk_f32     v3, s74, 2.741, v174// GFX11: encoding: [0x4a,0x42,0x45,0xc8,0x4a,0x02,0x02,0x7a,0x8b,0x6c,0x2f,0x40]75 76// LITERAL + VCC77 78v_dual_fmaak_f32    v122, v0, v161, 2.741       ::  v_dual_cndmask_b32   v1, v2, v379// GFX11: encoding: [0x00,0x43,0x53,0xc8,0x02,0x07,0x00,0x7a,0x8b,0x6c,0x2f,0x40]80 81// LITERAL*2 + VCC82 83v_dual_fmaak_f32    v122, v0, v161, 2.741       ::  v_dual_cndmask_b32   v1, 2.741, v384// GFX11: encoding: [0x00,0x43,0x53,0xc8,0xff,0x06,0x00,0x7a,0x8b,0x6c,0x2f,0x40]85 86// LITERAL*2 + VCC*287 88v_dual_cndmask_b32  v255, 0xbabe, v2             ::  v_dual_cndmask_b32   v6, 0xbabe, v389// GFX11: encoding: [0xff,0x04,0x52,0xca,0xff,0x06,0x06,0xff,0xbe,0xba,0x00,0x00]90 91// SGPR*2 + VCC92 93v_dual_add_f32      v255, s105, v2               ::  v_dual_cndmask_b32   v6, s105, v394// GFX11: encoding: [0x69,0x04,0x12,0xc9,0x69,0x06,0x06,0xff]95 96// SGPR*2 + VCC*297 98v_dual_cndmask_b32  v255, s1, v2                 ::  v_dual_cndmask_b32   v6, s1, v399// GFX11: encoding: [0x01,0x04,0x52,0xca,0x01,0x06,0x06,0xff]100 101// VCC*2102 103v_dual_add_f32      v255, vcc_lo, v2             ::  v_dual_cndmask_b32   v6, v1, v3104// GFX11: encoding: [0x6a,0x04,0x12,0xc9,0x01,0x07,0x06,0xff]105 106//===----------------------------------------------------------------------===//107// One dst register must be even and the other odd.108//===----------------------------------------------------------------------===//109 110v_dual_mul_f32      v0, v10, v20                 ::  v_dual_mul_f32      v1, v11, v21111// GFX11: encoding: [0x0a,0x29,0xc6,0xc8,0x0b,0x2b,0x00,0x00]112 113v_dual_mul_f32      v1, v10, v20                 ::  v_dual_mul_f32      v0, v11, v21114// GFX11: encoding: [0x0a,0x29,0xc6,0xc8,0x0b,0x2b,0x00,0x01]115 116//===----------------------------------------------------------------------===//117// srcX0 and srcY0 must use different VGPR banks.118//===----------------------------------------------------------------------===//119 120v_dual_mul_f32      v0, v10, v20                 ::  v_dual_mul_f32      v1, v11, v21121// GFX11: encoding: [0x0a,0x29,0xc6,0xc8,0x0b,0x2b,0x00,0x00]122 123v_dual_mul_f32      v0, v10, v20                 ::  v_dual_mul_f32      v1, v12, v21124// GFX11: encoding: [0x0a,0x29,0xc6,0xc8,0x0c,0x2b,0x00,0x00]125 126v_dual_mul_f32      v0, v10, v20                 ::  v_dual_mul_f32      v1, v13, v21127// GFX11: encoding: [0x0a,0x29,0xc6,0xc8,0x0d,0x2b,0x00,0x00]128 129v_dual_mul_f32      v0, v10, v20                 ::  v_dual_mul_f32      v1, v15, v21130// GFX11: encoding: [0x0a,0x29,0xc6,0xc8,0x0f,0x2b,0x00,0x00]131 132v_dual_mul_f32      v0, v10, v20                 ::  v_dual_mul_f32      v1, v16, v21133// GFX11: encoding: [0x0a,0x29,0xc6,0xc8,0x10,0x2b,0x00,0x00]134 135v_dual_mul_f32      v0, v10, v20                 ::  v_dual_mul_f32      v1, v17, v21136// GFX11: encoding: [0x0a,0x29,0xc6,0xc8,0x11,0x2b,0x00,0x00]137 138//===----------------------------------------------------------------------===//139// srcX1 and srcY1 must use different VGPR banks.140//===----------------------------------------------------------------------===//141 142v_dual_mul_f32      v0, v10, v20                 ::  v_dual_mul_f32      v1, v11, v21143// GFX11: encoding: [0x0a,0x29,0xc6,0xc8,0x0b,0x2b,0x00,0x00]144 145v_dual_mul_f32      v0, v10, v20                 ::  v_dual_mul_f32      v1, v11, v22146// GFX11: encoding: [0x0a,0x29,0xc6,0xc8,0x0b,0x2d,0x00,0x00]147 148v_dual_mul_f32      v0, v10, v20                 ::  v_dual_mul_f32      v1, v11, v23149// GFX11: encoding: [0x0a,0x29,0xc6,0xc8,0x0b,0x2f,0x00,0x00]150 151v_dual_mul_f32      v0, v10, v20                 ::  v_dual_mul_f32      v1, v11, v25152// GFX11: encoding: [0x0a,0x29,0xc6,0xc8,0x0b,0x33,0x00,0x00]153 154v_dual_mul_f32      v0, v10, v20                 ::  v_dual_mul_f32      v1, v11, v26155// GFX11: encoding: [0x0a,0x29,0xc6,0xc8,0x0b,0x35,0x00,0x00]156 157v_dual_mul_f32      v0, v10, v20                 ::  v_dual_mul_f32      v1, v11, v27158// GFX11: encoding: [0x0a,0x29,0xc6,0xc8,0x0b,0x37,0x00,0x00]159 160//===----------------------------------------------------------------------===//161// srcX2 and srcY2 must use different VGPR banks.162//===----------------------------------------------------------------------===//163 164v_dual_fmamk_f32    v6, v1, 0xaf123456, v0       :: v_dual_fmamk_f32      v5, v2, 0xaf123456, v1165// GFX11: encoding: [0x01,0x01,0x84,0xc8,0x02,0x03,0x04,0x06,0x56,0x34,0x12,0xaf]166 167v_dual_fmamk_f32    v6, v1, 0xaf123456, v1       :: v_dual_fmamk_f32      v5, v2, 0xaf123456, v0168// GFX11: encoding: [0x01,0x03,0x84,0xc8,0x02,0x01,0x04,0x06,0x56,0x34,0x12,0xaf]169 170v_dual_fmac_f32     v6, v1, v2                   :: v_dual_fmamk_f32      v7, v2, 0xaf123456, v7171// GFX11: encoding: [0x01,0x05,0x04,0xc8,0x02,0x0f,0x06,0x06,0x56,0x34,0x12,0xaf]172 173v_dual_fmac_f32     v7, v1, v2                   :: v_dual_fmamk_f32      v6, v2, 0xaf123456, v6174// GFX11: encoding: [0x01,0x05,0x04,0xc8,0x02,0x0d,0x06,0x07,0x56,0x34,0x12,0xaf]175 176v_dual_fmamk_f32    v5, v1, 0xaf123456, v5       :: v_dual_fmac_f32       v6, v2, v3177// GFX11: encoding: [0x01,0x0b,0x80,0xc8,0x02,0x07,0x06,0x05,0x56,0x34,0x12,0xaf]178 179v_dual_fmamk_f32    v6, v1, 0xaf123456, v6       :: v_dual_fmac_f32       v5, v2, v3180// GFX11: encoding: [0x01,0x0d,0x80,0xc8,0x02,0x07,0x04,0x06,0x56,0x34,0x12,0xaf]181