1*9880d681SAndroid Build Coastguard Worker// RUN: llvm-mc -arch=amdgcn -show-encoding %s | FileCheck --check-prefix=GCN --check-prefix=SICI %s 2*9880d681SAndroid Build Coastguard Worker// RUN: llvm-mc -arch=amdgcn -mcpu=SI -show-encoding %s | FileCheck --check-prefix=GCN --check-prefix=SICI %s 3*9880d681SAndroid Build Coastguard Worker// RUN: llvm-mc -arch=amdgcn -mcpu=bonaire -show-encoding %s | FileCheck --check-prefix=GCN --check-prefix=SICI %s 4*9880d681SAndroid Build Coastguard Worker// RUN: not llvm-mc -arch=amdgcn -mcpu=fiji -show-encoding %s | FileCheck --check-prefix=GCN --check-prefix=VI %s 5*9880d681SAndroid Build Coastguard Worker// RUN: not llvm-mc -arch=amdgcn -mcpu=fiji -show-encoding %s 2>&1 | FileCheck --check-prefix=NOVI %s 6*9880d681SAndroid Build Coastguard Worker 7*9880d681SAndroid Build Coastguard Workers_add_u32 s1, s2, s3 8*9880d681SAndroid Build Coastguard Worker// GCN: s_add_u32 s1, s2, s3 ; encoding: [0x02,0x03,0x01,0x80] 9*9880d681SAndroid Build Coastguard Worker 10*9880d681SAndroid Build Coastguard Workers_sub_u32 s1, s2, s3 11*9880d681SAndroid Build Coastguard Worker// GCN: s_sub_u32 s1, s2, s3 ; encoding: [0x02,0x03,0x81,0x80] 12*9880d681SAndroid Build Coastguard Worker 13*9880d681SAndroid Build Coastguard Workers_add_i32 s1, s2, s3 14*9880d681SAndroid Build Coastguard Worker// GCN: s_add_i32 s1, s2, s3 ; encoding: [0x02,0x03,0x01,0x81] 15*9880d681SAndroid Build Coastguard Worker 16*9880d681SAndroid Build Coastguard Workers_sub_i32 s1, s2, s3 17*9880d681SAndroid Build Coastguard Worker// GCN: s_sub_i32 s1, s2, s3 ; encoding: [0x02,0x03,0x81,0x81] 18*9880d681SAndroid Build Coastguard Worker 19*9880d681SAndroid Build Coastguard Workers_addc_u32 s1, s2, s3 20*9880d681SAndroid Build Coastguard Worker// GCN: s_addc_u32 s1, s2, s3 ; encoding: [0x02,0x03,0x01,0x82] 21*9880d681SAndroid Build Coastguard Worker 22*9880d681SAndroid Build Coastguard Workers_subb_u32 s1, s2, s3 23*9880d681SAndroid Build Coastguard Worker// GCN: s_subb_u32 s1, s2, s3 ; encoding: [0x02,0x03,0x81,0x82] 24*9880d681SAndroid Build Coastguard Worker 25*9880d681SAndroid Build Coastguard Workers_min_i32 s1, s2, s3 26*9880d681SAndroid Build Coastguard Worker// GCN: s_min_i32 s1, s2, s3 ; encoding: [0x02,0x03,0x01,0x83] 27*9880d681SAndroid Build Coastguard Worker 28*9880d681SAndroid Build Coastguard Workers_min_u32 s1, s2, s3 29*9880d681SAndroid Build Coastguard Worker// GCN: s_min_u32 s1, s2, s3 ; encoding: [0x02,0x03,0x81,0x83] 30*9880d681SAndroid Build Coastguard Worker 31*9880d681SAndroid Build Coastguard Workers_max_i32 s1, s2, s3 32*9880d681SAndroid Build Coastguard Worker// GCN: s_max_i32 s1, s2, s3 ; encoding: [0x02,0x03,0x01,0x84] 33*9880d681SAndroid Build Coastguard Worker 34*9880d681SAndroid Build Coastguard Workers_max_u32 s1, s2, s3 35*9880d681SAndroid Build Coastguard Worker// GCN: s_max_u32 s1, s2, s3 ; encoding: [0x02,0x03,0x81,0x84] 36*9880d681SAndroid Build Coastguard Worker 37*9880d681SAndroid Build Coastguard Workers_cselect_b32 s1, s2, s3 38*9880d681SAndroid Build Coastguard Worker// GCN: s_cselect_b32 s1, s2, s3 ; encoding: [0x02,0x03,0x01,0x85] 39*9880d681SAndroid Build Coastguard Worker 40*9880d681SAndroid Build Coastguard Workers_cselect_b64 s[2:3], s[4:5], s[6:7] 41*9880d681SAndroid Build Coastguard Worker// GCN: s_cselect_b64 s[2:3], s[4:5], s[6:7] ; encoding: [0x04,0x06,0x82,0x85] 42*9880d681SAndroid Build Coastguard Worker 43*9880d681SAndroid Build Coastguard Workers_and_b32 s2, s4, s6 44*9880d681SAndroid Build Coastguard Worker// SICI: s_and_b32 s2, s4, s6 ; encoding: [0x04,0x06,0x02,0x87] 45*9880d681SAndroid Build Coastguard Worker// VI: s_and_b32 s2, s4, s6 ; encoding: [0x04,0x06,0x02,0x86] 46*9880d681SAndroid Build Coastguard Worker 47*9880d681SAndroid Build Coastguard Workers_and_b64 s[2:3], s[4:5], s[6:7] 48*9880d681SAndroid Build Coastguard Worker// SICI: s_and_b64 s[2:3], s[4:5], s[6:7] ; encoding: [0x04,0x06,0x82,0x87] 49*9880d681SAndroid Build Coastguard Worker// VI: s_and_b64 s[2:3], s[4:5], s[6:7] ; encoding: [0x04,0x06,0x82,0x86] 50*9880d681SAndroid Build Coastguard Worker 51*9880d681SAndroid Build Coastguard Workers_or_b32 s2, s4, s6 52*9880d681SAndroid Build Coastguard Worker// SICI: s_or_b32 s2, s4, s6 ; encoding: [0x04,0x06,0x02,0x88] 53*9880d681SAndroid Build Coastguard Worker// VI: s_or_b32 s2, s4, s6 ; encoding: [0x04,0x06,0x02,0x87] 54*9880d681SAndroid Build Coastguard Worker 55*9880d681SAndroid Build Coastguard Workers_or_b64 s[2:3], s[4:5], s[6:7] 56*9880d681SAndroid Build Coastguard Worker// SICI: s_or_b64 s[2:3], s[4:5], s[6:7] ; encoding: [0x04,0x06,0x82,0x88] 57*9880d681SAndroid Build Coastguard Worker// VI: s_or_b64 s[2:3], s[4:5], s[6:7] ; encoding: [0x04,0x06,0x82,0x87] 58*9880d681SAndroid Build Coastguard Worker 59*9880d681SAndroid Build Coastguard Workers_xor_b32 s2, s4, s6 60*9880d681SAndroid Build Coastguard Worker// SICI: s_xor_b32 s2, s4, s6 ; encoding: [0x04,0x06,0x02,0x89] 61*9880d681SAndroid Build Coastguard Worker// VI: s_xor_b32 s2, s4, s6 ; encoding: [0x04,0x06,0x02,0x88] 62*9880d681SAndroid Build Coastguard Worker 63*9880d681SAndroid Build Coastguard Workers_xor_b64 s[2:3], s[4:5], s[6:7] 64*9880d681SAndroid Build Coastguard Worker// SICI: s_xor_b64 s[2:3], s[4:5], s[6:7] ; encoding: [0x04,0x06,0x82,0x89] 65*9880d681SAndroid Build Coastguard Worker// VI: s_xor_b64 s[2:3], s[4:5], s[6:7] ; encoding: [0x04,0x06,0x82,0x88] 66*9880d681SAndroid Build Coastguard Worker 67*9880d681SAndroid Build Coastguard Workers_andn2_b32 s2, s4, s6 68*9880d681SAndroid Build Coastguard Worker// SICI: s_andn2_b32 s2, s4, s6 ; encoding: [0x04,0x06,0x02,0x8a] 69*9880d681SAndroid Build Coastguard Worker// VI: s_andn2_b32 s2, s4, s6 ; encoding: [0x04,0x06,0x02,0x89] 70*9880d681SAndroid Build Coastguard Worker 71*9880d681SAndroid Build Coastguard Workers_andn2_b64 s[2:3], s[4:5], s[6:7] 72*9880d681SAndroid Build Coastguard Worker// SICI: s_andn2_b64 s[2:3], s[4:5], s[6:7] ; encoding: [0x04,0x06,0x82,0x8a] 73*9880d681SAndroid Build Coastguard Worker// VI: s_andn2_b64 s[2:3], s[4:5], s[6:7] ; encoding: [0x04,0x06,0x82,0x89] 74*9880d681SAndroid Build Coastguard Worker 75*9880d681SAndroid Build Coastguard Workers_orn2_b32 s2, s4, s6 76*9880d681SAndroid Build Coastguard Worker// SICI: s_orn2_b32 s2, s4, s6 ; encoding: [0x04,0x06,0x02,0x8b] 77*9880d681SAndroid Build Coastguard Worker// VI: s_orn2_b32 s2, s4, s6 ; encoding: [0x04,0x06,0x02,0x8a] 78*9880d681SAndroid Build Coastguard Worker 79*9880d681SAndroid Build Coastguard Workers_orn2_b64 s[2:3], s[4:5], s[6:7] 80*9880d681SAndroid Build Coastguard Worker// SICI: s_orn2_b64 s[2:3], s[4:5], s[6:7] ; encoding: [0x04,0x06,0x82,0x8b] 81*9880d681SAndroid Build Coastguard Worker// VI: s_orn2_b64 s[2:3], s[4:5], s[6:7] ; encoding: [0x04,0x06,0x82,0x8a] 82*9880d681SAndroid Build Coastguard Worker 83*9880d681SAndroid Build Coastguard Workers_nand_b32 s2, s4, s6 84*9880d681SAndroid Build Coastguard Worker// SICI: s_nand_b32 s2, s4, s6 ; encoding: [0x04,0x06,0x02,0x8c] 85*9880d681SAndroid Build Coastguard Worker// VI: s_nand_b32 s2, s4, s6 ; encoding: [0x04,0x06,0x02,0x8b] 86*9880d681SAndroid Build Coastguard Worker 87*9880d681SAndroid Build Coastguard Workers_nand_b64 s[2:3], s[4:5], s[6:7] 88*9880d681SAndroid Build Coastguard Worker// SICI: s_nand_b64 s[2:3], s[4:5], s[6:7] ; encoding: [0x04,0x06,0x82,0x8c] 89*9880d681SAndroid Build Coastguard Worker// VI: s_nand_b64 s[2:3], s[4:5], s[6:7] ; encoding: [0x04,0x06,0x82,0x8b] 90*9880d681SAndroid Build Coastguard Worker 91*9880d681SAndroid Build Coastguard Workers_nor_b32 s2, s4, s6 92*9880d681SAndroid Build Coastguard Worker// SICI: s_nor_b32 s2, s4, s6 ; encoding: [0x04,0x06,0x02,0x8d] 93*9880d681SAndroid Build Coastguard Worker// VI: s_nor_b32 s2, s4, s6 ; encoding: [0x04,0x06,0x02,0x8c] 94*9880d681SAndroid Build Coastguard Worker 95*9880d681SAndroid Build Coastguard Workers_nor_b64 s[2:3], s[4:5], s[6:7] 96*9880d681SAndroid Build Coastguard Worker// SICI: s_nor_b64 s[2:3], s[4:5], s[6:7] ; encoding: [0x04,0x06,0x82,0x8d] 97*9880d681SAndroid Build Coastguard Worker// VI: s_nor_b64 s[2:3], s[4:5], s[6:7] ; encoding: [0x04,0x06,0x82,0x8c] 98*9880d681SAndroid Build Coastguard Worker 99*9880d681SAndroid Build Coastguard Workers_xnor_b32 s2, s4, s6 100*9880d681SAndroid Build Coastguard Worker// SICI: s_xnor_b32 s2, s4, s6 ; encoding: [0x04,0x06,0x02,0x8e] 101*9880d681SAndroid Build Coastguard Worker// VI: s_xnor_b32 s2, s4, s6 ; encoding: [0x04,0x06,0x02,0x8d] 102*9880d681SAndroid Build Coastguard Worker 103*9880d681SAndroid Build Coastguard Workers_xnor_b64 s[2:3], s[4:5], s[6:7] 104*9880d681SAndroid Build Coastguard Worker// SICI: s_xnor_b64 s[2:3], s[4:5], s[6:7] ; encoding: [0x04,0x06,0x82,0x8e] 105*9880d681SAndroid Build Coastguard Worker// VI: s_xnor_b64 s[2:3], s[4:5], s[6:7] ; encoding: [0x04,0x06,0x82,0x8d] 106*9880d681SAndroid Build Coastguard Worker 107*9880d681SAndroid Build Coastguard Workers_lshl_b32 s2, s4, s6 108*9880d681SAndroid Build Coastguard Worker// SICI: s_lshl_b32 s2, s4, s6 ; encoding: [0x04,0x06,0x02,0x8f] 109*9880d681SAndroid Build Coastguard Worker// VI: s_lshl_b32 s2, s4, s6 ; encoding: [0x04,0x06,0x02,0x8e] 110*9880d681SAndroid Build Coastguard Worker 111*9880d681SAndroid Build Coastguard Workers_lshl_b64 s[2:3], s[4:5], s6 112*9880d681SAndroid Build Coastguard Worker// SICI: s_lshl_b64 s[2:3], s[4:5], s6 ; encoding: [0x04,0x06,0x82,0x8f] 113*9880d681SAndroid Build Coastguard Worker// VI: s_lshl_b64 s[2:3], s[4:5], s6 ; encoding: [0x04,0x06,0x82,0x8e] 114*9880d681SAndroid Build Coastguard Worker 115*9880d681SAndroid Build Coastguard Workers_lshr_b32 s2, s4, s6 116*9880d681SAndroid Build Coastguard Worker// SICI: s_lshr_b32 s2, s4, s6 ; encoding: [0x04,0x06,0x02,0x90] 117*9880d681SAndroid Build Coastguard Worker// VI: s_lshr_b32 s2, s4, s6 ; encoding: [0x04,0x06,0x02,0x8f] 118*9880d681SAndroid Build Coastguard Worker 119*9880d681SAndroid Build Coastguard Workers_lshr_b64 s[2:3], s[4:5], s6 120*9880d681SAndroid Build Coastguard Worker// SICI: s_lshr_b64 s[2:3], s[4:5], s6 ; encoding: [0x04,0x06,0x82,0x90] 121*9880d681SAndroid Build Coastguard Worker// VI: s_lshr_b64 s[2:3], s[4:5], s6 ; encoding: [0x04,0x06,0x82,0x8f] 122*9880d681SAndroid Build Coastguard Worker 123*9880d681SAndroid Build Coastguard Workers_ashr_i32 s2, s4, s6 124*9880d681SAndroid Build Coastguard Worker// SICI: s_ashr_i32 s2, s4, s6 ; encoding: [0x04,0x06,0x02,0x91] 125*9880d681SAndroid Build Coastguard Worker// VI: s_ashr_i32 s2, s4, s6 ; encoding: [0x04,0x06,0x02,0x90] 126*9880d681SAndroid Build Coastguard Worker 127*9880d681SAndroid Build Coastguard Workers_ashr_i64 s[2:3], s[4:5], s6 128*9880d681SAndroid Build Coastguard Worker// SICI: s_ashr_i64 s[2:3], s[4:5], s6 ; encoding: [0x04,0x06,0x82,0x91] 129*9880d681SAndroid Build Coastguard Worker// VI: s_ashr_i64 s[2:3], s[4:5], s6 ; encoding: [0x04,0x06,0x82,0x90] 130*9880d681SAndroid Build Coastguard Worker 131*9880d681SAndroid Build Coastguard Workers_bfm_b32 s2, s4, s6 132*9880d681SAndroid Build Coastguard Worker// SICI: s_bfm_b32 s2, s4, s6 ; encoding: [0x04,0x06,0x02,0x92] 133*9880d681SAndroid Build Coastguard Worker// VI: s_bfm_b32 s2, s4, s6 ; encoding: [0x04,0x06,0x02,0x91] 134*9880d681SAndroid Build Coastguard Worker 135*9880d681SAndroid Build Coastguard Workers_bfm_b64 s[2:3], s4, s6 136*9880d681SAndroid Build Coastguard Worker// SICI: s_bfm_b64 s[2:3], s4, s6 ; encoding: [0x04,0x06,0x82,0x92] 137*9880d681SAndroid Build Coastguard Worker// VI: s_bfm_b64 s[2:3], s4, s6 ; encoding: [0x04,0x06,0x82,0x91] 138*9880d681SAndroid Build Coastguard Worker 139*9880d681SAndroid Build Coastguard Workers_mul_i32 s2, s4, s6 140*9880d681SAndroid Build Coastguard Worker// SICI: s_mul_i32 s2, s4, s6 ; encoding: [0x04,0x06,0x02,0x93] 141*9880d681SAndroid Build Coastguard Worker// VI: s_mul_i32 s2, s4, s6 ; encoding: [0x04,0x06,0x02,0x92] 142*9880d681SAndroid Build Coastguard Worker 143*9880d681SAndroid Build Coastguard Workers_bfe_u32 s2, s4, s6 144*9880d681SAndroid Build Coastguard Worker// SICI: s_bfe_u32 s2, s4, s6 ; encoding: [0x04,0x06,0x82,0x93] 145*9880d681SAndroid Build Coastguard Worker// VI: s_bfe_u32 s2, s4, s6 ; encoding: [0x04,0x06,0x82,0x92] 146*9880d681SAndroid Build Coastguard Worker 147*9880d681SAndroid Build Coastguard Workers_bfe_i32 s2, s4, s6 148*9880d681SAndroid Build Coastguard Worker// SICI: s_bfe_i32 s2, s4, s6 ; encoding: [0x04,0x06,0x02,0x94] 149*9880d681SAndroid Build Coastguard Worker// VI: s_bfe_i32 s2, s4, s6 ; encoding: [0x04,0x06,0x02,0x93] 150*9880d681SAndroid Build Coastguard Worker 151*9880d681SAndroid Build Coastguard Workers_bfe_u64 s[2:3], s[4:5], s6 152*9880d681SAndroid Build Coastguard Worker// SICI: s_bfe_u64 s[2:3], s[4:5], s6 ; encoding: [0x04,0x06,0x82,0x94] 153*9880d681SAndroid Build Coastguard Worker// VI: s_bfe_u64 s[2:3], s[4:5], s6 ; encoding: [0x04,0x06,0x82,0x93] 154*9880d681SAndroid Build Coastguard Worker 155*9880d681SAndroid Build Coastguard Workers_bfe_i64 s[2:3], s[4:5], s6 156*9880d681SAndroid Build Coastguard Worker// SICI: s_bfe_i64 s[2:3], s[4:5], s6 ; encoding: [0x04,0x06,0x02,0x95] 157*9880d681SAndroid Build Coastguard Worker// VI: s_bfe_i64 s[2:3], s[4:5], s6 ; encoding: [0x04,0x06,0x02,0x94] 158*9880d681SAndroid Build Coastguard Worker 159*9880d681SAndroid Build Coastguard Workers_cbranch_g_fork s[4:5], s[6:7] 160*9880d681SAndroid Build Coastguard Worker// SICI: s_cbranch_g_fork s[4:5], s[6:7] ; encoding: [0x04,0x06,0x80,0x95] 161*9880d681SAndroid Build Coastguard Worker// VI: s_cbranch_g_fork s[4:5], s[6:7] ; encoding: [0x04,0x06,0x80,0x94] 162*9880d681SAndroid Build Coastguard Worker 163*9880d681SAndroid Build Coastguard Workers_absdiff_i32 s2, s4, s6 164*9880d681SAndroid Build Coastguard Worker// SICI: s_absdiff_i32 s2, s4, s6 ; encoding: [0x04,0x06,0x02,0x96] 165*9880d681SAndroid Build Coastguard Worker// VI: s_absdiff_i32 s2, s4, s6 ; encoding: [0x04,0x06,0x02,0x95] 166*9880d681SAndroid Build Coastguard Worker 167*9880d681SAndroid Build Coastguard Workers_add_u32 s101, s102, s103 168*9880d681SAndroid Build Coastguard Worker// SICI: s_add_u32 s101, s102, s103 ; encoding: [0x66,0x67,0x65,0x80] 169*9880d681SAndroid Build Coastguard Worker// NOVI: error: not a valid operand 170