1 # RUN: llvm-mc -arch=amdgcn -mcpu=tonga -disassemble -show-encoding < %s | FileCheck %s -check-prefix=VI 2 3 # VI: v_cmp_lt_f32_e64 s[2:3], v4, -v6 ; encoding: [0x02,0x00,0x41,0xd0,0x04,0x0d,0x02,0x40] 4 0x02 0x00 0x41 0xd0 0x04 0x0d 0x02 0x40 5 6 # VI: v_cmp_lt_f32_e64 vcc, v4, v6 ; encoding: [0x6a,0x00,0x41,0xd0,0x04,0x0d,0x02,0x00] 7 0x6a 0x00 0x41 0xd0 0x04 0x0d 0x02 0x00 8 9 # VI: v_cmp_lt_f32_e64 s[2:3], -v4, v6 ; encoding: [0x02,0x00,0x41,0xd0,0x04,0x0d,0x02,0x20] 10 0x02 0x00 0x41 0xd0 0x04 0x0d 0x02 0x20 11 12 # VI: v_cmp_lt_f32_e64 s[2:3], v4, -v6 ; encoding: [0x02,0x00,0x41,0xd0,0x04,0x0d,0x02,0x40] 13 0x02 0x00 0x41 0xd0 0x04 0x0d 0x02 0x40 14 15 # VI: v_cmp_lt_f32_e64 s[2:3], -v4, -v6 ; encoding: [0x02,0x00,0x41,0xd0,0x04,0x0d,0x02,0x60] 16 0x02 0x00 0x41 0xd0 0x04 0x0d 0x02 0x60 17 18 # VI: v_cmp_lt_f32_e64 s[2:3], |v4|, v6 ; encoding: [0x02,0x01,0x41,0xd0,0x04,0x0d,0x02,0x00] 19 0x02 0x01 0x41 0xd0 0x04 0x0d 0x02 0x00 20 21 # VI: v_cmp_lt_f32_e64 s[2:3], v4, |v6| ; encoding: [0x02,0x02,0x41,0xd0,0x04,0x0d,0x02,0x00] 22 0x02 0x02 0x41 0xd0 0x04 0x0d 0x02 0x00 23 24 # VI: v_cmp_lt_f32_e64 s[2:3], |v4|, |v6| ; encoding: [0x02,0x03,0x41,0xd0,0x04,0x0d,0x02,0x00] 25 0x02 0x03 0x41 0xd0 0x04 0x0d 0x02 0x00 26 27 # VI: v_cmp_lt_f32_e64 s[2:3], -|v4|, v6 ; encoding: [0x02,0x01,0x41,0xd0,0x04,0x0d,0x02,0x20] 28 0x02 0x01 0x41 0xd0 0x04 0x0d 0x02 0x20 29 30 # VI: v_cmp_lt_f32_e64 s[2:3], -|v4|, v6 ; encoding: [0x02,0x01,0x41,0xd0,0x04,0x0d,0x02,0x20] 31 0x02 0x01 0x41 0xd0 0x04 0x0d 0x02 0x20 32 33 # VI: v_cmp_lt_f32_e64 s[2:3], v4, -|v6| ; encoding: [0x02,0x02,0x41,0xd0,0x04,0x0d,0x02,0x40] 34 0x02 0x02 0x41 0xd0 0x04 0x0d 0x02 0x40 35 36 # VI: v_cmp_lt_f32_e64 s[2:3], v4, -|v6| ; encoding: [0x02,0x02,0x41,0xd0,0x04,0x0d,0x02,0x40] 37 0x02 0x02 0x41 0xd0 0x04 0x0d 0x02 0x40 38 39 # VI: v_cmp_lt_f32_e64 s[2:3], -|v4|, -|v6| ; encoding: [0x02,0x03,0x41,0xd0,0x04,0x0d,0x02,0x60] 40 0x02 0x03 0x41 0xd0 0x04 0x0d 0x02 0x60 41 42 # VI: v_cmp_lt_f32_e64 s[2:3], -|v4|, -|v6| ; encoding: [0x02,0x03,0x41,0xd0,0x04,0x0d,0x02,0x60] 43 0x02 0x03 0x41 0xd0 0x04 0x0d 0x02 0x60 44 45 # VI: v_cmp_f_f32_e64 s[2:3], v4, v6 ; encoding: [0x02,0x00,0x40,0xd0,0x04,0x0d,0x02,0x00] 46 0x02 0x00 0x40 0xd0 0x04 0x0d 0x02 0x00 47 48 # VI: v_cmp_lt_f32_e64 s[2:3], v4, v6 ; encoding: [0x02,0x00,0x41,0xd0,0x04,0x0d,0x02,0x00] 49 0x02 0x00 0x41 0xd0 0x04 0x0d 0x02 0x00 50 51 # VI: v_cmp_eq_f32_e64 s[2:3], v4, v6 ; encoding: [0x02,0x00,0x42,0xd0,0x04,0x0d,0x02,0x00] 52 0x02 0x00 0x42 0xd0 0x04 0x0d 0x02 0x00 53 54 # VI: v_cmp_le_f32_e64 s[2:3], v4, v6 ; encoding: [0x02,0x00,0x43,0xd0,0x04,0x0d,0x02,0x00] 55 0x02 0x00 0x43 0xd0 0x04 0x0d 0x02 0x00 56 57 # VI: v_cmp_gt_f32_e64 s[2:3], v4, v6 ; encoding: [0x02,0x00,0x44,0xd0,0x04,0x0d,0x02,0x00] 58 0x02 0x00 0x44 0xd0 0x04 0x0d 0x02 0x00 59 60 # VI: v_cmp_lg_f32_e64 s[2:3], v4, v6 ; encoding: [0x02,0x00,0x45,0xd0,0x04,0x0d,0x02,0x00] 61 0x02 0x00 0x45 0xd0 0x04 0x0d 0x02 0x00 62 63 # VI: v_cmp_ge_f32_e64 s[2:3], v4, v6 ; encoding: [0x02,0x00,0x46,0xd0,0x04,0x0d,0x02,0x00] 64 0x02 0x00 0x46 0xd0 0x04 0x0d 0x02 0x00 65 66 # VI: v_cmp_f_f64_e64 s[2:3], v[4:5], v[6:7] ; encoding: [0x02,0x00,0x60,0xd0,0x04,0x0d,0x02,0x00] 67 0x02 0x00 0x60 0xd0 0x04 0x0d 0x02 0x00 68 69 # VI: v_cmp_f_i32_e64 s[2:3], v4, v6 ; encoding: [0x02,0x00,0xc0,0xd0,0x04,0x0d,0x02,0x00] 70 0x02 0x00 0xc0 0xd0 0x04 0x0d 0x02 0x00 71 72 # VI: v_cmp_f_i64_e64 s[2:3], v[4:5], v[6:7] ; encoding: [0x02,0x00,0xe0,0xd0,0x04,0x0d,0x02,0x00] 73 0x02 0x00 0xe0 0xd0 0x04 0x0d 0x02 0x00 74 75 # VI: v_mov_b32_e64 v1, v2 ; encoding: [0x01,0x00,0x41,0xd1,0x02,0x01,0x00,0x00] 76 0x01 0x00 0x41 0xd1 0x02 0x01 0x00 0x00 77 78 # VI: v_nop ; encoding: [0x00,0x00,0x40,0xd1,0x00,0x00,0x00,0x00] 79 0x00 0x00 0x40 0xd1 0x00 0x00 0x00 0x00 80 81 # VI: v_clrexcp ; encoding: [0x00,0x00,0x75,0xd1,0x00,0x00,0x00,0x00] 82 0x00 0x00 0x75 0xd1 0x00 0x00 0x00 0x00 83 84 # VI: v_fract_f32_e64 v1, -v2 ; encoding: [0x01,0x00,0x5b,0xd1,0x02,0x01,0x00,0x20] 85 0x01 0x00 0x5b 0xd1 0x02 0x01 0x00 0x20 86 87 # VI: v_fract_f32_e64 v1, |v2| ; encoding: [0x01,0x01,0x5b,0xd1,0x02,0x01,0x00,0x00] 88 0x01 0x01 0x5b 0xd1 0x02 0x01 0x00 0x00 89 90 # VI: v_fract_f32_e64 v1, |v2| ; encoding: [0x01,0x01,0x5b,0xd1,0x02,0x01,0x00,0x00] 91 0x01 0x01 0x5b 0xd1 0x02 0x01 0x00 0x00 92 93 # VI: v_fract_f32_e64 v1, -|v2| ; encoding: [0x01,0x01,0x5b,0xd1,0x02,0x01,0x00,0x20] 94 0x01 0x01 0x5b 0xd1 0x02 0x01 0x00 0x20 95 96 # VI: v_fract_f32_e64 v1, -|v2| ; encoding: [0x01,0x01,0x5b,0xd1,0x02,0x01,0x00,0x20] 97 0x01 0x01 0x5b 0xd1 0x02 0x01 0x00 0x20 98 99 # VI: v_fract_f32_e64 v1, v2 clamp ; encoding: [0x01,0x80,0x5b,0xd1,0x02,0x01,0x00,0x00] 100 0x01 0x80 0x5b 0xd1 0x02 0x01 0x00 0x00 101 102 # VI: v_fract_f32_e64 v1, v2 mul:2 ; encoding: [0x01,0x00,0x5b,0xd1,0x02,0x01,0x00,0x08] 103 0x01 0x00 0x5b 0xd1 0x02 0x01 0x00 0x08 104 105 # VI: v_fract_f32_e64 v1, v2 clamp div:2 ; encoding: [0x01,0x80,0x5b,0xd1,0x02,0x01,0x00,0x18] 106 0x01 0x80 0x5b 0xd1 0x02 0x01 0x00 0x18 107 108 # VI: v_add_f32_e64 v1, v3, v5 ; encoding: [0x01,0x00,0x01,0xd1,0x03,0x0b,0x02,0x00] 109 0x01 0x00 0x01 0xd1 0x03 0x0b 0x02 0x00 110 111 # VI: v_cndmask_b32_e64 v1, v3, v5, s[4:5] ; encoding: [0x01,0x00,0x00,0xd1,0x03,0x0b,0x12,0x00] 112 0x01 0x00 0x00 0xd1 0x03 0x0b 0x12 0x00 113 114 # VI: v_cndmask_b32_e64 v1, v3, v5, vcc ; encoding: [0x01,0x00,0x00,0xd1,0x03,0x0b,0xaa,0x01] 115 0x01 0x00 0x00 0xd1 0x03 0x0b 0xaa 0x01 116 117 # VI: v_add_f32_e64 v1, v3, s5 ; encoding: [0x01,0x00,0x01,0xd1,0x03,0x0b,0x00,0x00] 118 0x01 0x00 0x01 0xd1 0x03 0x0b 0x00 0x00 119 120 # VI: v_sub_f32_e64 v1, v3, s5 ; encoding: [0x01,0x00,0x02,0xd1,0x03,0x0b,0x00,0x00] 121 0x01 0x00 0x02 0xd1 0x03 0x0b 0x00 0x00 122 123 # VI: v_subrev_f32_e64 v1, v3, s5 ; encoding: [0x01,0x00,0x03,0xd1,0x03,0x0b,0x00,0x00] 124 0x01 0x00 0x03 0xd1 0x03 0x0b 0x00 0x00 125 126 # VI: v_mul_legacy_f32_e64 v1, v3, s5 ; encoding: [0x01,0x00,0x04,0xd1,0x03,0x0b,0x00,0x00] 127 0x01 0x00 0x04 0xd1 0x03 0x0b 0x00 0x00 128 129 # VI: v_mul_f32_e64 v1, v3, s5 ; encoding: [0x01,0x00,0x05,0xd1,0x03,0x0b,0x00,0x00] 130 0x01 0x00 0x05 0xd1 0x03 0x0b 0x00 0x00 131 132 # VI: v_mul_i32_i24_e64 v1, v3, s5 ; encoding: [0x01,0x00,0x06,0xd1,0x03,0x0b,0x00,0x00] 133 0x01 0x00 0x06 0xd1 0x03 0x0b 0x00 0x00 134 135 # VI: v_mad_legacy_f32 v2, v4, v6, v8 ; encoding: [0x02,0x00,0xc0,0xd1,0x04,0x0d,0x22,0x04] 136 0x02 0x00 0xc0 0xd1 0x04 0x0d 0x22 0x04 137 138 # VI: v_add_f64 v[0:1], v[2:3], v[5:6] ; encoding: [0x00,0x00,0x80,0xd2,0x02,0x0b,0x02,0x00] 139 0x00 0x00 0x80 0xd2 0x02 0x0b 0x02 0x00 140 141 # VI: v_add_f64 v[0:1], v[2:3], v[5:6] ; encoding: [0x00,0x00,0x80,0xd2,0x02,0x0b,0x02,0x00] 142 0x00 0x00 0x80 0xd2 0x02 0x0b 0x02 0x00 143 144 # VI: v_add_f64 v[0:1], -v[2:3], v[5:6] ; encoding: [0x00,0x00,0x80,0xd2,0x02,0x0b,0x02,0x20] 145 0x00 0x00 0x80 0xd2 0x02 0x0b 0x02 0x20 146 147 # VI: v_add_f64 v[0:1], -v[2:3], v[5:6] ; encoding: [0x00,0x00,0x80,0xd2,0x02,0x0b,0x02,0x20] 148 0x00 0x00 0x80 0xd2 0x02 0x0b 0x02 0x20 149 150 # VI: v_add_f64 v[0:1], v[2:3], -v[5:6] ; encoding: [0x00,0x00,0x80,0xd2,0x02,0x0b,0x02,0x40] 151 0x00 0x00 0x80 0xd2 0x02 0x0b 0x02 0x40 152 153 # VI: v_add_f64 v[0:1], v[2:3], -v[5:6] ; encoding: [0x00,0x00,0x80,0xd2,0x02,0x0b,0x02,0x40] 154 0x00 0x00 0x80 0xd2 0x02 0x0b 0x02 0x40 155 156 # VI: v_add_f64 v[0:1], |v[2:3]|, v[5:6] ; encoding: [0x00,0x01,0x80,0xd2,0x02,0x0b,0x02,0x00] 157 0x00 0x01 0x80 0xd2 0x02 0x0b 0x02 0x00 158 159 # VI: v_add_f64 v[0:1], |v[2:3]|, v[5:6] ; encoding: [0x00,0x01,0x80,0xd2,0x02,0x0b,0x02,0x00] 160 0x00 0x01 0x80 0xd2 0x02 0x0b 0x02 0x00 161 162 # VI: v_add_f64 v[0:1], |v[2:3]|, v[5:6] ; encoding: [0x00,0x01,0x80,0xd2,0x02,0x0b,0x02,0x00] 163 0x00 0x01 0x80 0xd2 0x02 0x0b 0x02 0x00 164 165 # VI: v_add_f64 v[0:1], |v[2:3]|, v[5:6] ; encoding: [0x00,0x01,0x80,0xd2,0x02,0x0b,0x02,0x00] 166 0x00 0x01 0x80 0xd2 0x02 0x0b 0x02 0x00 167 168 # VI: v_add_f64 v[0:1], v[2:3], |v[5:6]| ; encoding: [0x00,0x02,0x80,0xd2,0x02,0x0b,0x02,0x00] 169 0x00 0x02 0x80 0xd2 0x02 0x0b 0x02 0x00 170 171 # VI: v_add_f64 v[0:1], v[2:3], |v[5:6]| ; encoding: [0x00,0x02,0x80,0xd2,0x02,0x0b,0x02,0x00] 172 0x00 0x02 0x80 0xd2 0x02 0x0b 0x02 0x00 173 174 # VI: v_add_f64 v[0:1], v[2:3], |v[5:6]| ; encoding: [0x00,0x02,0x80,0xd2,0x02,0x0b,0x02,0x00] 175 0x00 0x02 0x80 0xd2 0x02 0x0b 0x02 0x00 176 177 # VI: v_add_f64 v[0:1], v[2:3], |v[5:6]| ; encoding: [0x00,0x02,0x80,0xd2,0x02,0x0b,0x02,0x00] 178 0x00 0x02 0x80 0xd2 0x02 0x0b 0x02 0x00 179 180 # VI: v_add_f64 v[0:1], -v[2:3], |v[5:6]| clamp mul:4 ; encoding: [0x00,0x82,0x80,0xd2,0x02,0x0b,0x02,0x30] 181 0x00 0x82 0x80 0xd2 0x02 0x0b 0x02 0x30 182 183 # VI: v_add_f64 v[0:1], -v[2:3], |v[5:6]| clamp mul:4 ; encoding: [0x00,0x82,0x80,0xd2,0x02,0x0b,0x02,0x30] 184 0x00 0x82 0x80 0xd2 0x02 0x0b 0x02 0x30 185 186 # VI: v_add_f64 v[0:1], -v[2:3], |v[5:6]| clamp mul:4 ; encoding: [0x00,0x82,0x80,0xd2,0x02,0x0b,0x02,0x30] 187 0x00 0x82 0x80 0xd2 0x02 0x0b 0x02 0x30 188 189 # VI: v_add_f64 v[0:1], -v[2:3], |v[5:6]| clamp mul:4 ; encoding: [0x00,0x82,0x80,0xd2,0x02,0x0b,0x02,0x30] 190 0x00 0x82 0x80 0xd2 0x02 0x0b 0x02 0x30 191 192 # VI: v_div_scale_f64 v[24:25], vcc, v[22:23], v[22:23], v[20:21] ; encoding: [0x18,0x6a,0xe1,0xd1,0x16,0x2d,0x52,0x04] 193 0x18 0x6a 0xe1 0xd1 0x16 0x2d 0x52 0x04 194 195 # VI: v_div_scale_f64 v[24:25], s[10:11], v[22:23], v[20:21], v[20:21] ; encoding: [0x18,0x0a,0xe1,0xd1,0x16,0x29,0x52,0x04] 196 0x18 0x0a 0xe1 0xd1 0x16 0x29 0x52 0x04 197 198 # VI: v_div_scale_f32 v24, vcc, v22, v22, v20 ; encoding: [0x18,0x6a,0xe0,0xd1,0x16,0x2d,0x52,0x04] 199 0x18 0x6a 0xe0 0xd1 0x16 0x2d 0x52 0x04 200 201 # FIXME: v_div_scale_f32 v24, vcc, s[10:11], v22, v20 ; encoding: [0x18,0x6a,0xe0,0xd1,0x0a,0x2c,0x52,0x04] 202 0x18 0x6a 0xe0 0xd1 0x0a 0x2c 0x52 0x04 203 204 # VI: v_div_scale_f32 v24, s[10:11], v22, v22, v20 ; encoding: [0x18,0x0a,0xe0,0xd1,0x16,0x2d,0x52,0x04] 205 0x18 0x0a 0xe0 0xd1 0x16 0x2d 0x52 0x04 206 207 # VI: v_div_scale_f32 v24, vcc, v22, 1.0, v22 ; encoding: [0x18,0x6a,0xe0,0xd1,0x16,0xe5,0x59,0x04] 208 0x18 0x6a 0xe0 0xd1 0x16 0xe5 0x59 0x04 209 210 # VI: v_div_scale_f32 v24, vcc, v22, v22, -2.0 ; encoding: [0x18,0x6a,0xe0,0xd1,0x16,0x2d,0xd6,0x03] 211 0x18 0x6a 0xe0 0xd1 0x16 0x2d 0xd6 0x03 212 213 # VI: v_div_scale_f32 v24, vcc, v22, v22, -2.0 ; encoding: [0x18,0x6a,0xe0,0xd1,0x16,0x2d,0xd6,0x03] 214 0x18 0x6a 0xe0 0xd1 0x16 0x2d 0xd6 0x03 215 216 # VI: v_mad_f32 v9, 0.5, v5, -v8 ; encoding: [0x09,0x00,0xc1,0xd1,0xf0,0x0a,0x22,0x84] 217 0x09 0x00 0xc1 0xd1 0xf0 0x0a 0x22 0x84 218