1// RUN: llvm-mc -arch=amdgcn -mcpu=gfx900 -show-encoding %s | FileCheck %s --check-prefix=GFX9 2 3//---------------------------------------------------------------------------// 4// VOP1/3 5//---------------------------------------------------------------------------// 6 7v_mov_b32 v0, src_lds_direct 8// GFX9: v_mov_b32_e32 v0, src_lds_direct ; encoding: [0xfe,0x02,0x00,0x7e] 9 10v_mov_b32_e64 v0, src_lds_direct 11// GFX9: v_mov_b32_e64 v0, src_lds_direct ; encoding: [0x00,0x00,0x41,0xd1,0xfe,0x00,0x00,0x00] 12 13v_cvt_f64_i32 v[0:1], src_lds_direct 14// GFX9: v_cvt_f64_i32_e32 v[0:1], src_lds_direct ; encoding: [0xfe,0x08,0x00,0x7e] 15 16v_cvt_f64_i32_e64 v[0:1], src_lds_direct 17// GFX9: v_cvt_f64_i32_e64 v[0:1], src_lds_direct ; encoding: [0x00,0x00,0x44,0xd1,0xfe,0x00,0x00,0x00] 18 19v_fract_f32 v0, src_lds_direct 20// GFX9: v_fract_f32_e32 v0, src_lds_direct ; encoding: [0xfe,0x36,0x00,0x7e] 21 22v_fract_f32_e64 v0, src_lds_direct 23// GFX9: v_fract_f32_e64 v0, src_lds_direct ; encoding: [0x00,0x00,0x5b,0xd1,0xfe,0x00,0x00,0x00] 24 25v_cvt_f16_u16 v0, src_lds_direct 26// GFX9: v_cvt_f16_u16_e32 v0, src_lds_direct ; encoding: [0xfe,0x72,0x00,0x7e] 27 28v_readfirstlane_b32 s0, src_lds_direct 29// GFX9: v_readfirstlane_b32 s0, src_lds_direct ; encoding: [0xfe,0x04,0x00,0x7e] 30 31//---------------------------------------------------------------------------// 32// VOP2/3 33//---------------------------------------------------------------------------// 34 35v_cndmask_b32 v0, src_lds_direct, v0, vcc 36// GFX9: v_cndmask_b32_e32 v0, src_lds_direct, v0, vcc ; encoding: [0xfe,0x00,0x00,0x00] 37 38v_cndmask_b32_e64 v0, src_lds_direct, v0, s[0:1] 39// GFX9: v_cndmask_b32_e64 v0, src_lds_direct, v0, s[0:1] ; encoding: [0x00,0x00,0x00,0xd1,0xfe,0x00,0x02,0x00] 40 41v_add_f32 v0, src_lds_direct, v0 42// GFX9: v_add_f32_e32 v0, src_lds_direct, v0 ; encoding: [0xfe,0x00,0x00,0x02] 43 44v_add_f32_e64 v0, src_lds_direct, v0 45// GFX9: v_add_f32_e64 v0, src_lds_direct, v0 ; encoding: [0x00,0x00,0x01,0xd1,0xfe,0x00,0x02,0x00] 46 47v_mul_i32_i24 v0, src_lds_direct, v0 48// GFX9: v_mul_i32_i24_e32 v0, src_lds_direct, v0 ; encoding: [0xfe,0x00,0x00,0x0c] 49 50v_add_co_u32 v0, vcc, src_lds_direct, v0 51// GFX9: v_add_co_u32_e32 v0, vcc, src_lds_direct, v0 ; encoding: [0xfe,0x00,0x00,0x32] 52 53//---------------------------------------------------------------------------// 54// VOP3 55//---------------------------------------------------------------------------// 56 57v_add_co_u32_e64 v0, s[0:1], src_lds_direct, v0 58// GFX9: v_add_co_u32_e64 v0, s[0:1], src_lds_direct, v0 ; encoding: [0x00,0x00,0x19,0xd1,0xfe,0x00,0x02,0x00] 59 60v_madmk_f16 v0, src_lds_direct, 0x1121, v0 61// GFX9: v_madmk_f16 v0, src_lds_direct, 0x1121, v0 ; encoding: [0xfe,0x00,0x00,0x48,0x21,0x11,0x00,0x00] 62 63v_madak_f16 v0, src_lds_direct, v0, 0x1121 64// GFX9: v_madak_f16 v0, src_lds_direct, v0, 0x1121 ; encoding: [0xfe,0x00,0x00,0x4a,0x21,0x11,0x00,0x00] 65 66v_mad_f32 v0, src_lds_direct, v0, v0 67// GFX9: v_mad_f32 v0, src_lds_direct, v0, v0 ; encoding: [0x00,0x00,0xc1,0xd1,0xfe,0x00,0x02,0x04] 68 69v_fma_f32 v0, src_lds_direct, v0, v0 70// GFX9: v_fma_f32 v0, src_lds_direct, v0, v0 ; encoding: [0x00,0x00,0xcb,0xd1,0xfe,0x00,0x02,0x04] 71 72v_min3_i16 v0, src_lds_direct, v0, v0 73// GFX9: v_min3_i16 v0, src_lds_direct, v0, v0 ; encoding: [0x00,0x00,0xf5,0xd1,0xfe,0x00,0x02,0x04] 74 75v_max3_f16 v0, src_lds_direct, v0, v0 76// GFX9: v_max3_f16 v0, src_lds_direct, v0, v0 ; encoding: [0x00,0x00,0xf7,0xd1,0xfe,0x00,0x02,0x04] 77 78v_readlane_b32 s0, src_lds_direct, s0 79// GFX9: v_readlane_b32 s0, src_lds_direct, s0 ; encoding: [0x00,0x00,0x89,0xd2,0xfe,0x00,0x00,0x00] 80 81//---------------------------------------------------------------------------// 82// VOP3P 83//---------------------------------------------------------------------------// 84 85v_pk_mad_i16 v0, src_lds_direct, v0, v0 86// GFX9: v_pk_mad_i16 v0, src_lds_direct, v0, v0 ; encoding: [0x00,0x40,0x80,0xd3,0xfe,0x00,0x02,0x1c] 87 88v_pk_add_i16 v0, src_lds_direct, v0 89// GFX9: v_pk_add_i16 v0, src_lds_direct, v0 ; encoding: [0x00,0x00,0x82,0xd3,0xfe,0x00,0x02,0x18] 90 91//---------------------------------------------------------------------------// 92// VOPC 93//---------------------------------------------------------------------------// 94 95v_cmp_lt_f16 vcc, src_lds_direct, v0 96// GFX9: v_cmp_lt_f16_e32 vcc, src_lds_direct, v0 ; encoding: [0xfe,0x00,0x42,0x7c] 97 98v_cmp_eq_f32 vcc, src_lds_direct, v0 99// GFX9: v_cmp_eq_f32_e32 vcc, src_lds_direct, v0 ; encoding: [0xfe,0x00,0x84,0x7c] 100 101v_cmpx_neq_f32 vcc, src_lds_direct, v0 102// GFX9: v_cmpx_neq_f32_e32 vcc, src_lds_direct, v0 ; encoding: [0xfe,0x00,0xba,0x7c] 103 104//---------------------------------------------------------------------------// 105// lds_direct alias 106//---------------------------------------------------------------------------// 107 108v_cmp_lt_f16 vcc, lds_direct, v0 109// GFX9: v_cmp_lt_f16_e32 vcc, src_lds_direct, v0 ; encoding: [0xfe,0x00,0x42,0x7c] 110