1# RUN: llvm-mc -triple=amdgcn -mcpu=gfx950 -show-encoding -disassemble %s | FileCheck -check-prefix=GFX950 %s 2 3# GFX950: global_load_lds_dwordx3 v2, s[4:5] offset:4 ; encoding: [0x04,0x80,0xf8,0xdd,0x02,0x00,0x04,0x00] 40x04,0x80,0xf8,0xdd,0x02,0x00,0x04,0x00 5 6# GFX950: global_load_lds_dwordx3 v[2:3], off ; encoding: [0x00,0x80,0xf8,0xdd,0x02,0x00,0x7f,0x00] 70x00,0x80,0xf8,0xdd,0x02,0x00,0x7f,0x00 8 9# GFX950: global_load_lds_dwordx3 v[2:3], off offset:4 ; encoding: [0x04,0x80,0xf8,0xdd,0x02,0x00,0x7f,0x00] 100x04,0x80,0xf8,0xdd,0x02,0x00,0x7f,0x00 11 12# GFX950: global_load_lds_dwordx3 v[2:3], off sc0 nt sc1 ; encoding: [0x00,0x80,0xfb,0xdf,0x02,0x00,0x7f,0x00] 130x00,0x80,0xfb,0xdf,0x02,0x00,0x7f,0x00 14 15# GFX950: global_load_lds_dwordx4 v2, s[4:5] offset:4 ; encoding: [0x04,0x80,0xf4,0xdd,0x02,0x00,0x04,0x00] 160x04,0x80,0xf4,0xdd,0x02,0x00,0x04,0x00 17 18# GFX950: global_load_lds_dwordx4 v[2:3], off ; encoding: [0x00,0x80,0xf4,0xdd,0x02,0x00,0x7f,0x00] 190x00,0x80,0xf4,0xdd,0x02,0x00,0x7f,0x00 20 21# GFX950: global_load_lds_dwordx4 v[2:3], off offset:4 ; encoding: [0x04,0x80,0xf4,0xdd,0x02,0x00,0x7f,0x00] 220x04,0x80,0xf4,0xdd,0x02,0x00,0x7f,0x00 23 24# GFX950: global_load_lds_dwordx4 v[2:3], off sc0 nt sc1 ; encoding: [0x00,0x80,0xf7,0xdf,0x02,0x00,0x7f,0x00] 250x00,0x80,0xf7,0xdf,0x02,0x00,0x7f,0x00 26 27 28# GFX950: buffer_load_dwordx3 off, s[8:11], s3 lds ; encoding: [0x00,0x00,0x59,0xe0,0x00,0x00,0x02,0x03] 290x00,0x00,0x59,0xe0,0x00,0x00,0x02,0x03 30 31# GFX950: buffer_load_dwordx3 off, s[8:11], s3 offset:4095 lds ; encoding: [0xff,0x0f,0x59,0xe0,0x00,0x00,0x02,0x03] 320xff,0x0f,0x59,0xe0,0x00,0x00,0x02,0x03 33 34# GFX950: buffer_load_dwordx3 v0, s[8:11], s101 offen lds ; encoding: [0x00,0x10,0x59,0xe0,0x00,0x00,0x02,0x65] 350x00,0x10,0x59,0xe0,0x00,0x00,0x02,0x65 36 37# GFX950: buffer_load_dwordx4 off, s[8:11], s3 lds ; encoding: [0x00,0x00,0x5d,0xe0,0x00,0x00,0x02,0x03] 380x00,0x00,0x5d,0xe0,0x00,0x00,0x02,0x03 39 40# GFX950: buffer_load_dwordx4 off, s[8:11], s3 offset:4095 lds ; encoding: [0xff,0x0f,0x5d,0xe0,0x00,0x00,0x02,0x03] 410xff,0x0f,0x5d,0xe0,0x00,0x00,0x02,0x03 42 43# GFX950: buffer_load_dwordx4 v0, s[8:11], s101 offen lds ; encoding: [0x00,0x10,0x5d,0xe0,0x00,0x00,0x02,0x65] 440x00,0x10,0x5d,0xe0,0x00,0x00,0x02,0x65 45 46 47# GFX950: v_permlane16_swap_b32_e32 v1, v2 ; encoding: [0x02,0xb3,0x02,0x7e] 480x02,0xb3,0x02,0x7e 49 50# GFX950: v_permlane16_swap_b32_e64 v1, v2 ; encoding: [0x01,0x00,0x99,0xd1,0x02,0x01,0x00,0x00] 510x01,0x00,0x99,0xd1,0x02,0x01,0x00,0x00 52 53# GFX950: v_permlane16_swap_b32_e64 v1, v2 bound_ctrl:1 ; encoding: [0x01,0x10,0x99,0xd1,0x02,0x01,0x00,0x00] 540x01,0x10,0x99,0xd1,0x02,0x01,0x00,0x00 55 56# GFX950: v_permlane16_swap_b32_e64 v1, v2 bound_ctrl:1 fi:1 ; encoding: [0x01,0x18,0x99,0xd1,0x02,0x01,0x00,0x00] 570x01,0x18,0x99,0xd1,0x02,0x01,0x00,0x00 58 59# GFX950: v_permlane16_swap_b32_e64 v1, v2 fi:1 ; encoding: [0x01,0x08,0x99,0xd1,0x02,0x01,0x00,0x00] 600x01,0x08,0x99,0xd1,0x02,0x01,0x00,0x00 61 62 63# GFX950: v_permlane32_swap_b32_e32 v1, v2 ; encoding: [0x02,0xb5,0x02,0x7e] 640x02,0xb5,0x02,0x7e 65 66# GFX950: v_permlane32_swap_b32_e64 v1, v2 ; encoding: [0x01,0x00,0x9a,0xd1,0x02,0x01,0x00,0x00] 670x01,0x00,0x9a,0xd1,0x02,0x01,0x00,0x00 68 69# GFX950: v_permlane32_swap_b32_e64 v1, v2 bound_ctrl:1 ; encoding: [0x01,0x10,0x9a,0xd1,0x02,0x01,0x00,0x00] 700x01,0x10,0x9a,0xd1,0x02,0x01,0x00,0x00 71 72# GFX950: v_permlane32_swap_b32_e64 v1, v2 bound_ctrl:1 fi:1 ; encoding: [0x01,0x18,0x9a,0xd1,0x02,0x01,0x00,0x00] 730x01,0x18,0x9a,0xd1,0x02,0x01,0x00,0x00 74 75# GFX950: v_permlane32_swap_b32_e64 v1, v2 fi:1 ; encoding: [0x01,0x08,0x9a,0xd1,0x02,0x01,0x00,0x00] 760x01,0x08,0x9a,0xd1,0x02,0x01,0x00,0x00 77 78# GFX950: buffer_atomic_pk_add_bf16 v5, off, s[8:11], s3 offset:4095 ; encoding: [0xff,0x0f,0x48,0xe1,0x00,0x05,0x02,0x03] 790xff,0x0f,0x48,0xe1,0x00,0x05,0x02,0x03 80 81# GFX950: buffer_atomic_pk_add_bf16 v255, off, s[8:11], s3 offset:4095 ; encoding: [0xff,0x0f,0x48,0xe1,0x00,0xff,0x02,0x03] 820xff,0x0f,0x48,0xe1,0x00,0xff,0x02,0x03 83 84# GFX950: buffer_atomic_pk_add_bf16 v5, off, s[12:15], s3 offset:4095 ; encoding: [0xff,0x0f,0x48,0xe1,0x00,0x05,0x03,0x03] 850xff,0x0f,0x48,0xe1,0x00,0x05,0x03,0x03 86 87# GFX950: buffer_atomic_pk_add_bf16 v5, off, s[96:99], s3 offset:4095 ; encoding: [0xff,0x0f,0x48,0xe1,0x00,0x05,0x18,0x03] 880xff,0x0f,0x48,0xe1,0x00,0x05,0x18,0x03 89 90# GFX950: buffer_atomic_pk_add_bf16 v5, off, s[8:11], s101 offset:4095 ; encoding: [0xff,0x0f,0x48,0xe1,0x00,0x05,0x02,0x65] 910xff,0x0f,0x48,0xe1,0x00,0x05,0x02,0x65 92 93# GFX950: buffer_atomic_pk_add_bf16 v5, off, s[8:11], m0 offset:4095 ; encoding: [0xff,0x0f,0x48,0xe1,0x00,0x05,0x02,0x7c] 940xff,0x0f,0x48,0xe1,0x00,0x05,0x02,0x7c 95 96# GFX950: buffer_atomic_pk_add_bf16 v5, v0, s[8:11], s3 idxen offset:4095 ; encoding: [0xff,0x2f,0x48,0xe1,0x00,0x05,0x02,0x03] 970xff,0x2f,0x48,0xe1,0x00,0x05,0x02,0x03 98 99# GFX950: buffer_atomic_pk_add_bf16 v5, v0, s[8:11], s3 offen offset:4095 ; encoding: [0xff,0x1f,0x48,0xe1,0x00,0x05,0x02,0x03] 1000xff,0x1f,0x48,0xe1,0x00,0x05,0x02,0x03 101 102# GFX950: buffer_atomic_pk_add_bf16 v5, off, s[8:11], s3 ; encoding: [0x00,0x00,0x48,0xe1,0x00,0x05,0x02,0x03] 1030x00,0x00,0x48,0xe1,0x00,0x05,0x02,0x03 104 105# GFX950: buffer_atomic_pk_add_bf16 v5, off, s[8:11], s3 ; encoding: [0x00,0x00,0x48,0xe1,0x00,0x05,0x02,0x03] 1060x00,0x00,0x48,0xe1,0x00,0x05,0x02,0x03 107 108# GFX950: buffer_atomic_pk_add_bf16 v5, off, s[8:11], s3 offset:7 ; encoding: [0x07,0x00,0x48,0xe1,0x00,0x05,0x02,0x03] 1090x07,0x00,0x48,0xe1,0x00,0x05,0x02,0x03 110 111# GFX950: buffer_atomic_pk_add_bf16 v5, off, s[8:11], 0 offset:4095 ; encoding: [0xff,0x0f,0x48,0xe1,0x00,0x05,0x02,0x80] 1120xff,0x0f,0x48,0xe1,0x00,0x05,0x02,0x80 113 114# GFX950: buffer_atomic_pk_add_bf16 v5, off, s[8:11], -1 offset:4095 ; encoding: [0xff,0x0f,0x48,0xe1,0x00,0x05,0x02,0xc1] 1150xff,0x0f,0x48,0xe1,0x00,0x05,0x02,0xc1 116 117# GFX950: buffer_atomic_pk_add_bf16 v5, off, s[8:11], 0.5 offset:4095 ; encoding: [0xff,0x0f,0x48,0xe1,0x00,0x05,0x02,0xf0] 1180xff,0x0f,0x48,0xe1,0x00,0x05,0x02,0xf0 119 120# GFX950: buffer_atomic_pk_add_bf16 v5, off, s[8:11], -4.0 offset:4095 ; encoding: [0xff,0x0f,0x48,0xe1,0x00,0x05,0x02,0xf7] 1210xff,0x0f,0x48,0xe1,0x00,0x05,0x02,0xf7 122