Nikolay Haustov | b1bfd50 | 2016-04-22 11:39:43 +0000 | [diff] [blame^] | 1 | // RUN: not llvm-mc -arch=amdgcn -show-encoding %s | FileCheck --check-prefix=GCN --check-prefix=SICI %s |
| 2 | // RUN: not llvm-mc -arch=amdgcn -mcpu=SI -show-encoding %s | FileCheck --check-prefix=GCN --check-prefix=SICI %s |
| 3 | // RUN: not llvm-mc -arch=amdgcn -mcpu=SI -show-encoding %s 2>&1 | FileCheck --check-prefix=NOSICI %s |
| 4 | // RUN: llvm-mc -arch=amdgcn -mcpu=fiji -show-encoding %s 2>&1 | FileCheck --check-prefix=GCN --check-prefix=VI %s |
| 5 | |
| 6 | s_mov_b32 [ttmp5], [ttmp3] |
| 7 | // SICI: s_mov_b32 ttmp5, ttmp3 ; encoding: [0x73,0x03,0xf5,0xbe] |
| 8 | // VI: s_mov_b32 ttmp5, ttmp3 ; encoding: [0x73,0x00,0xf5,0xbe] |
| 9 | |
| 10 | s_mov_b64 [ttmp4,ttmp5], [ttmp2,ttmp3] |
| 11 | // SICI: s_mov_b64 ttmp[4:5], ttmp[2:3] ; encoding: [0x72,0x04,0xf4,0xbe] |
| 12 | // VI: s_mov_b64 ttmp[4:5], ttmp[2:3] ; encoding: [0x72,0x01,0xf4,0xbe] |
| 13 | |
| 14 | s_mov_b64 ttmp[4:5], ttmp[2:3] |
| 15 | // SICI: s_mov_b64 ttmp[4:5], ttmp[2:3] ; encoding: [0x72,0x04,0xf4,0xbe] |
| 16 | // VI: s_mov_b64 ttmp[4:5], ttmp[2:3] ; encoding: [0x72,0x01,0xf4,0xbe] |
| 17 | |
| 18 | s_mov_b64 [s6,s7], s[8:9] |
| 19 | // SICI: s_mov_b64 s[6:7], s[8:9] ; encoding: [0x08,0x04,0x86,0xbe] |
| 20 | // VI: s_mov_b64 s[6:7], s[8:9] ; encoding: [0x08,0x01,0x86,0xbe] |
| 21 | |
| 22 | s_mov_b64 s[6:7], [s8,s9] |
| 23 | // SICI: s_mov_b64 s[6:7], s[8:9] ; encoding: [0x08,0x04,0x86,0xbe] |
| 24 | // VI: s_mov_b64 s[6:7], s[8:9] ; encoding: [0x08,0x01,0x86,0xbe] |
| 25 | |
| 26 | s_mov_b64 [exec_lo,exec_hi], s[2:3] |
| 27 | // SICI: s_mov_b64 exec, s[2:3] ; encoding: [0x02,0x04,0xfe,0xbe] |
| 28 | // VI: s_mov_b64 exec, s[2:3] ; encoding: [0x02,0x01,0xfe,0xbe] |
| 29 | |
| 30 | s_mov_b64 [flat_scratch_lo,flat_scratch_hi], s[2:3] |
| 31 | // NOSICI: error: |
| 32 | // VI: s_mov_b64 flat_scratch, s[2:3] ; encoding: [0x02,0x01,0xe6,0xbe] |
| 33 | |
| 34 | s_mov_b64 [vcc_lo,vcc_hi], s[2:3] |
| 35 | // SICI: s_mov_b64 vcc, s[2:3] ; encoding: [0x02,0x04,0xea,0xbe] |
| 36 | // VI: s_mov_b64 vcc, s[2:3] ; encoding: [0x02,0x01,0xea,0xbe] |
| 37 | |
| 38 | s_mov_b64 [tba_lo,tba_hi], s[2:3] |
| 39 | // SICI: s_mov_b64 tba, s[2:3] ; encoding: [0x02,0x04,0xec,0xbe] |
| 40 | // VI: s_mov_b64 tba, s[2:3] ; encoding: [0x02,0x01,0xec,0xbe] |
| 41 | |
| 42 | s_mov_b64 [tma_lo,tma_hi], s[2:3] |
| 43 | // SICI: s_mov_b64 tma, s[2:3] ; encoding: [0x02,0x04,0xee,0xbe] |
| 44 | // VI: s_mov_b64 tma, s[2:3] ; encoding: [0x02,0x01,0xee,0xbe] |
| 45 | |
| 46 | v_mov_b32 [v1], [v2] |
| 47 | // GCN: v_mov_b32_e32 v1, v2 ; encoding: [0x02,0x03,0x02,0x7e] |
| 48 | |
| 49 | v_rcp_f64 [v1,v2], [v2,v3] |
| 50 | // SICI: v_rcp_f64_e32 v[1:2], v[2:3] ; encoding: [0x02,0x5f,0x02,0x7e] |
| 51 | // VI: v_rcp_f64_e32 v[1:2], v[2:3] ; encoding: [0x02,0x4b,0x02,0x7e] |
| 52 | |
| 53 | buffer_load_dwordx4 [v1,v2,v3,v4], [s4,s5,s6,s7], s1 |
| 54 | // SICI: buffer_load_dwordx4 v[1:4], s[4:7], s1 ; encoding: [0x00,0x00,0x38,0xe0,0x00,0x01,0x01,0x01] |
| 55 | // VI: buffer_load_dwordx4 v[1:4], s[4:7], s1 ; encoding: [0x00,0x00,0x5c,0xe0,0x00,0x01,0x01,0x01] |