brintos

brintos / llvm-project-archived public Read only

0
0
Text · 4.4 KiB · cdd9f30 Raw
110 lines · plain
1// RUN: llvm-mc -triple=amdgcn -mcpu=gfx1250 -show-encoding %s | FileCheck -check-prefix=GFX12 %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// GFX12: 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// GFX12: encoding: [0xff,0x04,0xc6,0xc8,0xff,0x0a,0x0a,0x0b,0x57,0x13,0x68,0x24]17 18// LITERAL + KIMM19 20v_dual_add_f32      v5, 0xaf123456, v2           ::  v_dual_fmaak_f32     v6, v3, v1, 0xaf123456 ;21// GFX12: encoding: [0xff,0x04,0x02,0xc9,0x03,0x03,0x06,0x05,0x56,0x34,0x12,0xaf]22 23// KIMM + LITERAL24 25v_dual_fmamk_f32    v122, v74, 0xa0172923, v161  ::  v_dual_lshlrev_b32   v247, 0xa0172923, v9926// GFX12: encoding: [0x4a,0x43,0xa3,0xc8,0xff,0xc6,0xf6,0x7a,0x23,0x29,0x17,0xa0]27 28// KIMM*229 30v_dual_fmamk_f32    v122, 0xdeadbeef, 0xdeadbeef, v161 ::  v_dual_fmamk_f32  v123, 0xdeadbeef, 0xdeadbeef, v16231// GFX12: encoding: [0xff,0x42,0x85,0xc8,0xff,0x44,0x7b,0x7a,0xef,0xbe,0xad,0xde]32 33//===----------------------------------------------------------------------===//34// A VOPD instruction can use 2 scalar operands,35// but implicit VCC must be counted in.36//===----------------------------------------------------------------------===//37 38// 2 different SGPRs39 40v_dual_mul_f32      v0, s1, v2                   ::  v_dual_mul_f32       v3, s4, v541// GFX12: encoding: [0x01,0x04,0xc6,0xc8,0x04,0x0a,0x02,0x00]42 43// SGPR + LITERAL44 45v_dual_fmaak_f32    v122, s74, v161, 2.741       ::  v_dual_max_i32       v247, v160, v9846// GFX12: encoding: [0x4a,0x42,0x6f,0xc8,0xa0,0xc5,0xf6,0x7a,0x8b,0x6c,0x2f,0x40]47 48v_dual_mov_b32      v247, v160                   ::  v_dual_fmaak_f32     v122, s74, v161, 2.74149// GFX12: encoding: [0xa0,0x01,0x02,0xca,0x4a,0x42,0x7b,0xf7,0x8b,0x6c,0x2f,0x40]50 51// SGPR*2 + LITERAL52 53v_dual_fmaak_f32    v122, s74, v161, 2.741       ::  v_dual_max_i32       v247, s74, v9854// GFX12: encoding: [0x4a,0x42,0x6f,0xc8,0x4a,0xc4,0xf6,0x7a,0x8b,0x6c,0x2f,0x40]55 56// SGPR + LITERAL*257 58v_dual_fmaak_f32    v122, s74, v161, 2.741       ::  v_dual_fmamk_f32     v3, v6, 2.741, v159// GFX12: encoding: [0x4a,0x42,0x45,0xc8,0x06,0x03,0x02,0x7a,0x8b,0x6c,0x2f,0x40]60 61// SGPR*2 + LITERAL*262 63v_dual_fmaak_f32    v122, s74, v161, 2.741       ::  v_dual_fmamk_f32     v3, s74, 2.741, v164// GFX12: encoding: [0x4a,0x42,0x45,0xc8,0x4a,0x02,0x02,0x7a,0x8b,0x6c,0x2f,0x40]65 66// LITERAL + VCC67 68v_dual_fmaak_f32    v122, v0, v161, 2.741       ::  v_dual_cndmask_b32   v1, v2, v369// GFX12: encoding: [0x00,0x43,0x53,0xc8,0x02,0x07,0x00,0x7a,0x8b,0x6c,0x2f,0x40]70 71// LITERAL*2 + VCC72 73v_dual_fmaak_f32    v122, v0, v161, 2.741       ::  v_dual_cndmask_b32   v1, 2.741, v374// GFX12: encoding: [0x00,0x43,0x53,0xc8,0xff,0x06,0x00,0x7a,0x8b,0x6c,0x2f,0x40]75 76// LITERAL*2 + VCC*277 78v_dual_cndmask_b32  v255, 0xbabe, v2             ::  v_dual_cndmask_b32   v6, 0xbabe, v379// GFX12: encoding: [0xff,0x04,0x52,0xca,0xff,0x06,0x06,0xff,0xbe,0xba,0x00,0x00]80 81// SGPR*2 + VCC82 83v_dual_add_f32      v255, s105, v2               ::  v_dual_cndmask_b32   v6, s105, v384// GFX12: encoding: [0x69,0x04,0x12,0xc9,0x69,0x06,0x06,0xff]85 86// SGPR*2 + VCC*287 88v_dual_cndmask_b32  v255, s1, v2                 ::  v_dual_cndmask_b32   v6, s1, v389// GFX12: encoding: [0x01,0x04,0x52,0xca,0x01,0x06,0x06,0xff]90 91// VCC*292 93v_dual_add_f32      v255, vcc_lo, v2             ::  v_dual_cndmask_b32   v6, v1, v394// GFX12: encoding: [0x6a,0x04,0x12,0xc9,0x01,0x07,0x06,0xff]95 96//===----------------------------------------------------------------------===//97// A VOPD OpY mov_b32 instruction uses SRC2 source-cache if OpX is also mov_b3298//===----------------------------------------------------------------------===//99 100v_dual_mov_b32      v2, v5                       ::  v_dual_mov_b32       v3, v1101// GFX12: encoding: [0x05,0x01,0x10,0xca,0x01,0x01,0x02,0x02]102 103//===----------------------------------------------------------------------===//104// SRCX0 and SRCY0 may use the same bank if they are using the same VGPR; same for105// VSRCX1 and VSRCY1.106//===----------------------------------------------------------------------===//107 108v_dual_add_f32 v2, v2, v5 :: v_dual_mul_f32 v3, v2, v5109// GFX12: encoding: [0x02,0x0b,0x06,0xc9,0x02,0x0b,0x02,0x02]110