1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py 2# RUN: llc -O0 -mtriple=amdgcn-mesa-mesa3d -mcpu=tahiti -run-pass=legalizer -global-isel-abort=0 %s -o - | FileCheck %s 3 4--- 5name: extract_s32_merge_s64_s32_s32_offset0 6 7body: | 8 bb.0: 9 ; CHECK-LABEL: name: extract_s32_merge_s64_s32_s32_offset0 10 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0 11 ; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 12 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY [[C]](s32) 13 ; CHECK: $vgpr0 = COPY [[COPY]](s32) 14 %0:_(s32) = G_CONSTANT i32 0 15 %1:_(s32) = G_CONSTANT i32 1 16 %2:_(s64) = G_MERGE_VALUES %0, %1 17 %3:_(s32) = G_EXTRACT %2, 0 18 $vgpr0 = COPY %3 19... 20 21--- 22name: extract_s32_merge_s64_s32_s32_offset32 23 24body: | 25 bb.0: 26 ; CHECK-LABEL: name: extract_s32_merge_s64_s32_s32_offset32 27 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0 28 ; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 29 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY [[C1]](s32) 30 ; CHECK: $vgpr0 = COPY [[COPY]](s32) 31 %0:_(s32) = G_CONSTANT i32 0 32 %1:_(s32) = G_CONSTANT i32 1 33 %2:_(s64) = G_MERGE_VALUES %0, %1 34 %3:_(s32) = G_EXTRACT %2, 32 35 $vgpr0 = COPY %3 36... 37 38--- 39name: extract_s64_merge_s128_s64_s64_offset0 40 41body: | 42 bb.0: 43 ; CHECK-LABEL: name: extract_s64_merge_s128_s64_s64_offset0 44 ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0 45 ; CHECK: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 1 46 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY [[C]](s64) 47 ; CHECK: $vgpr0_vgpr1 = COPY [[COPY]](s64) 48 %0:_(s64) = G_CONSTANT i64 0 49 %1:_(s64) = G_CONSTANT i64 1 50 %2:_(s128) = G_MERGE_VALUES %0, %1 51 %3:_(s64) = G_EXTRACT %2, 0 52 $vgpr0_vgpr1 = COPY %3 53... 54 55--- 56name: extract_s64_merge_s128_s64_s64_offset64 57 58body: | 59 bb.0: 60 ; CHECK-LABEL: name: extract_s64_merge_s128_s64_s64_offset64 61 ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0 62 ; CHECK: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 1 63 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY [[C1]](s64) 64 ; CHECK: $vgpr0_vgpr1 = COPY [[COPY]](s64) 65 %0:_(s64) = G_CONSTANT i64 0 66 %1:_(s64) = G_CONSTANT i64 1 67 %2:_(s128) = G_MERGE_VALUES %0, %1 68 %3:_(s64) = G_EXTRACT %2, 64 69 $vgpr0_vgpr1 = COPY %3 70... 71 72--- 73name: extract_s32_merge_s128_s64_s64_offset0 74 75body: | 76 bb.0: 77 ; CHECK-LABEL: name: extract_s32_merge_s128_s64_s64_offset0 78 ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0 79 ; CHECK: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 1 80 ; CHECK: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[C]](s64), 0 81 ; CHECK: $vgpr0 = COPY [[EXTRACT]](s32) 82 %0:_(s64) = G_CONSTANT i64 0 83 %1:_(s64) = G_CONSTANT i64 1 84 %2:_(s128) = G_MERGE_VALUES %0, %1 85 %3:_(s32) = G_EXTRACT %2, 0 86 $vgpr0 = COPY %3 87... 88 89--- 90name: extract_s32_merge_s128_s64_s64_offset32 91 92body: | 93 bb.0: 94 ; CHECK-LABEL: name: extract_s32_merge_s128_s64_s64_offset32 95 ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0 96 ; CHECK: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 1 97 ; CHECK: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[C]](s64), 32 98 ; CHECK: $vgpr0 = COPY [[EXTRACT]](s32) 99 %0:_(s64) = G_CONSTANT i64 0 100 %1:_(s64) = G_CONSTANT i64 1 101 %2:_(s128) = G_MERGE_VALUES %0, %1 102 %3:_(s32) = G_EXTRACT %2, 32 103 $vgpr0 = COPY %3 104... 105 106--- 107name: extract_s32_merge_s128_s64_s64_offset64 108 109body: | 110 bb.0: 111 ; CHECK-LABEL: name: extract_s32_merge_s128_s64_s64_offset64 112 ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0 113 ; CHECK: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 1 114 ; CHECK: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[C1]](s64), 0 115 ; CHECK: $vgpr0 = COPY [[EXTRACT]](s32) 116 %0:_(s64) = G_CONSTANT i64 0 117 %1:_(s64) = G_CONSTANT i64 1 118 %2:_(s128) = G_MERGE_VALUES %0, %1 119 %3:_(s32) = G_EXTRACT %2, 64 120 $vgpr0 = COPY %3 121... 122 123--- 124name: extract_s32_merge_s128_s64_s64_offset96 125 126body: | 127 bb.0: 128 ; CHECK-LABEL: name: extract_s32_merge_s128_s64_s64_offset96 129 ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0 130 ; CHECK: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 1 131 ; CHECK: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[C1]](s64), 32 132 ; CHECK: $vgpr0 = COPY [[EXTRACT]](s32) 133 %0:_(s64) = G_CONSTANT i64 0 134 %1:_(s64) = G_CONSTANT i64 1 135 %2:_(s128) = G_MERGE_VALUES %0, %1 136 %3:_(s32) = G_EXTRACT %2, 96 137 $vgpr0 = COPY %3 138... 139 140# Destination size fits, but is skewed from the start of the register. 141--- 142name: extract_s16_merge_s128_s64_s64_offset18 143 144body: | 145 bb.0: 146 ; CHECK-LABEL: name: extract_s16_merge_s128_s64_s64_offset18 147 ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0 148 ; CHECK: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 1 149 ; CHECK: [[EXTRACT:%[0-9]+]]:_(s16) = G_EXTRACT [[C]](s64), 18 150 ; CHECK: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[EXTRACT]](s16) 151 ; CHECK: $vgpr0 = COPY [[ANYEXT]](s32) 152 %0:_(s64) = G_CONSTANT i64 0 153 %1:_(s64) = G_CONSTANT i64 1 154 %2:_(s128) = G_MERGE_VALUES %0, %1 155 %3:_(s16) = G_EXTRACT %2, 18 156 %4:_(s32) = G_ANYEXT %3 157 $vgpr0 = COPY %4 158... 159 160# Destination size fits, but is skewed from the start of the register. 161--- 162name: extract_s16_merge_s128_s64_s64_offset82 163 164body: | 165 bb.0: 166 ; CHECK-LABEL: name: extract_s16_merge_s128_s64_s64_offset82 167 ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0 168 ; CHECK: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 1 169 ; CHECK: [[EXTRACT:%[0-9]+]]:_(s16) = G_EXTRACT [[C1]](s64), 18 170 ; CHECK: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[EXTRACT]](s16) 171 ; CHECK: $vgpr0 = COPY [[ANYEXT]](s32) 172 %0:_(s64) = G_CONSTANT i64 0 173 %1:_(s64) = G_CONSTANT i64 1 174 %2:_(s128) = G_MERGE_VALUES %0, %1 175 %3:_(s16) = G_EXTRACT %2, 82 176 %4:_(s32) = G_ANYEXT %3 177 $vgpr0 = COPY %4 178... 179 180 181# Can't handle this since it spans two registers 182--- 183name: extract_s64_merge_s128_s64_s64_offset32 184 185body: | 186 bb.0: 187 ; CHECK-LABEL: name: extract_s64_merge_s128_s64_s64_offset32 188 ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0 189 ; CHECK: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 1 190 ; CHECK: [[MV:%[0-9]+]]:_(s128) = G_MERGE_VALUES [[C]](s64), [[C1]](s64) 191 ; CHECK: [[EXTRACT:%[0-9]+]]:_(s64) = G_EXTRACT [[MV]](s128), 32 192 ; CHECK: $vgpr0_vgpr1 = COPY [[EXTRACT]](s64) 193 %0:_(s64) = G_CONSTANT i64 0 194 %1:_(s64) = G_CONSTANT i64 1 195 %2:_(s128) = G_MERGE_VALUES %0, %1 196 %3:_(s64) = G_EXTRACT %2, 32 197 $vgpr0_vgpr1 = COPY %3 198... 199 200 201# Only the last bit spans to another register 202--- 203name: extract_s16_merge_s32_s32_offset1 204 205body: | 206 bb.0: 207 ; CHECK-LABEL: name: extract_s16_merge_s32_s32_offset1 208 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0 209 ; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 210 ; CHECK: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[C]](s32), [[C1]](s32) 211 ; CHECK: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[MV]](s64), 1 212 ; CHECK: $vgpr0 = COPY [[EXTRACT]](s32) 213 %0:_(s32) = G_CONSTANT i32 0 214 %1:_(s32) = G_CONSTANT i32 1 215 %2:_(s64) = G_MERGE_VALUES %0, %1 216 %3:_(s32) = G_EXTRACT %2, 1 217 $vgpr0 = COPY %3 218... 219 220 221# Test with some merges with 3 operands 222 223--- 224name: extract_s32_merge_s96_s32_s32_s32_offset0 225 226body: | 227 bb.0: 228 ; CHECK-LABEL: name: extract_s32_merge_s96_s32_s32_s32_offset0 229 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0 230 ; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 231 ; CHECK: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 232 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY [[C]](s32) 233 ; CHECK: $vgpr0 = COPY [[COPY]](s32) 234 %0:_(s32) = G_CONSTANT i32 0 235 %1:_(s32) = G_CONSTANT i32 1 236 %2:_(s32) = G_CONSTANT i32 1 237 %3:_(s96) = G_MERGE_VALUES %0, %1, %2 238 %4:_(s32) = G_EXTRACT %3, 0 239 $vgpr0 = COPY %4 240... 241 242--- 243name: extract_s32_merge_s96_s32_s32_s32_offset64 244 245body: | 246 bb.0: 247 ; CHECK-LABEL: name: extract_s32_merge_s96_s32_s32_s32_offset64 248 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0 249 ; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 250 ; CHECK: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 251 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY [[C2]](s32) 252 ; CHECK: $vgpr0 = COPY [[COPY]](s32) 253 %0:_(s32) = G_CONSTANT i32 0 254 %1:_(s32) = G_CONSTANT i32 1 255 %2:_(s32) = G_CONSTANT i32 1 256 %3:_(s96) = G_MERGE_VALUES %0, %1, %2 257 %4:_(s32) = G_EXTRACT %3, 64 258 $vgpr0 = COPY %4 259... 260 261--- 262name: extract_s64_merge_s96_s32_s32_s32_offset0 263 264body: | 265 bb.0: 266 ; CHECK-LABEL: name: extract_s64_merge_s96_s32_s32_s32_offset0 267 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0 268 ; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 269 ; CHECK: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 270 ; CHECK: [[MV:%[0-9]+]]:_(s96) = G_MERGE_VALUES [[C]](s32), [[C1]](s32), [[C2]](s32) 271 ; CHECK: [[EXTRACT:%[0-9]+]]:_(s64) = G_EXTRACT [[MV]](s96), 0 272 ; CHECK: $vgpr0_vgpr1 = COPY [[EXTRACT]](s64) 273 %0:_(s32) = G_CONSTANT i32 0 274 %1:_(s32) = G_CONSTANT i32 1 275 %2:_(s32) = G_CONSTANT i32 1 276 %3:_(s96) = G_MERGE_VALUES %0, %1, %2 277 %4:_(s64) = G_EXTRACT %3, 0 278 $vgpr0_vgpr1 = COPY %4 279... 280 281--- 282name: extract_s64_merge_s96_s32_s32_s32_offset32 283 284body: | 285 bb.0: 286 ; CHECK-LABEL: name: extract_s64_merge_s96_s32_s32_s32_offset32 287 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0 288 ; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 289 ; CHECK: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 1 290 ; CHECK: [[MV:%[0-9]+]]:_(s96) = G_MERGE_VALUES [[C]](s32), [[C1]](s32), [[C2]](s32) 291 ; CHECK: [[EXTRACT:%[0-9]+]]:_(s64) = G_EXTRACT [[MV]](s96), 32 292 ; CHECK: $vgpr0_vgpr1 = COPY [[EXTRACT]](s64) 293 %0:_(s32) = G_CONSTANT i32 0 294 %1:_(s32) = G_CONSTANT i32 1 295 %2:_(s32) = G_CONSTANT i32 1 296 %3:_(s96) = G_MERGE_VALUES %0, %1, %2 297 %4:_(s64) = G_EXTRACT %3, 32 298 $vgpr0_vgpr1 = COPY %4 299... 300 301# Test build_vector sources 302--- 303name: extract_s64_build_vector_v2s64_s64_s64_offset0 304 305body: | 306 bb.0: 307 ; CHECK-LABEL: name: extract_s64_build_vector_v2s64_s64_s64_offset0 308 ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0 309 ; CHECK: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 1 310 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY [[C]](s64) 311 ; CHECK: $vgpr0_vgpr1 = COPY [[COPY]](s64) 312 %0:_(s64) = G_CONSTANT i64 0 313 %1:_(s64) = G_CONSTANT i64 1 314 %2:_(<2 x s64>) = G_BUILD_VECTOR %0, %1 315 %3:_(s64) = G_EXTRACT %2, 0 316 $vgpr0_vgpr1 = COPY %3 317... 318 319--- 320name: extract_s64_build_vector_v2s64_s64_s64_offset64 321 322body: | 323 bb.0: 324 ; CHECK-LABEL: name: extract_s64_build_vector_v2s64_s64_s64_offset64 325 ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0 326 ; CHECK: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 1 327 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY [[C1]](s64) 328 ; CHECK: $vgpr0_vgpr1 = COPY [[COPY]](s64) 329 %0:_(s64) = G_CONSTANT i64 0 330 %1:_(s64) = G_CONSTANT i64 1 331 %2:_(<2 x s64>) = G_BUILD_VECTOR %0, %1 332 %3:_(s64) = G_EXTRACT %2, 64 333 $vgpr0_vgpr1 = COPY %3 334... 335 336--- 337name: extract_s64_build_vector_v2s64_s64_s64_offset32 338 339body: | 340 bb.0: 341 ; CHECK-LABEL: name: extract_s64_build_vector_v2s64_s64_s64_offset32 342 ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0 343 ; CHECK: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 1 344 ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[C]](s64), [[C1]](s64) 345 ; CHECK: [[EXTRACT:%[0-9]+]]:_(s64) = G_EXTRACT [[BUILD_VECTOR]](<2 x s64>), 32 346 ; CHECK: $vgpr0_vgpr1 = COPY [[EXTRACT]](s64) 347 %0:_(s64) = G_CONSTANT i64 0 348 %1:_(s64) = G_CONSTANT i64 1 349 %2:_(<2 x s64>) = G_BUILD_VECTOR %0, %1 350 %3:_(s64) = G_EXTRACT %2, 32 351 $vgpr0_vgpr1 = COPY %3 352... 353 354# Test extracting something smaller than the element size 355--- 356name: extract_s32_build_vector_v2s64_s64_s64_offset64 357 358body: | 359 bb.0: 360 ; CHECK-LABEL: name: extract_s32_build_vector_v2s64_s64_s64_offset64 361 ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0 362 ; CHECK: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 1 363 ; CHECK: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[C1]](s64), 0 364 ; CHECK: $vgpr0 = COPY [[EXTRACT]](s32) 365 %0:_(s64) = G_CONSTANT i64 0 366 %1:_(s64) = G_CONSTANT i64 1 367 %2:_(<2 x s64>) = G_BUILD_VECTOR %0, %1 368 %3:_(s32) = G_EXTRACT %2, 64 369 $vgpr0 = COPY %3 370 371... 372 373# Test concat_vector sources 374--- 375name: extract_v2s16_build_vector_v2s64_v2s16_v2s16_offset0 376 377body: | 378 bb.0: 379 liveins: $vgpr0, $vgpr1 380 ; CHECK-LABEL: name: extract_v2s16_build_vector_v2s64_v2s16_v2s16_offset0 381 ; CHECK: [[COPY:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr0 382 ; CHECK: [[COPY1:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr1 383 ; CHECK: [[COPY2:%[0-9]+]]:_(<2 x s16>) = COPY [[COPY]](<2 x s16>) 384 ; CHECK: $vgpr0 = COPY [[COPY2]](<2 x s16>) 385 %0:_(<2 x s16>) = COPY $vgpr0 386 %1:_(<2 x s16>) = COPY $vgpr1 387 %2:_(<4 x s16>) = G_CONCAT_VECTORS %0, %1 388 %3:_(<2 x s16>) = G_EXTRACT %2, 0 389 $vgpr0 = COPY %3 390... 391 392--- 393name: extract_v2s16_build_vector_v2s64_v2s16_v2s16_offset32 394 395body: | 396 bb.0: 397 liveins: $vgpr0, $vgpr1 398 ; CHECK-LABEL: name: extract_v2s16_build_vector_v2s64_v2s16_v2s16_offset32 399 ; CHECK: [[COPY:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr0 400 ; CHECK: [[COPY1:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr1 401 ; CHECK: [[COPY2:%[0-9]+]]:_(<2 x s16>) = COPY [[COPY1]](<2 x s16>) 402 ; CHECK: $vgpr0 = COPY [[COPY2]](<2 x s16>) 403 %0:_(<2 x s16>) = COPY $vgpr0 404 %1:_(<2 x s16>) = COPY $vgpr1 405 %2:_(<4 x s16>) = G_CONCAT_VECTORS %0, %1 406 %3:_(<2 x s16>) = G_EXTRACT %2, 32 407 $vgpr0 = COPY %3 408... 409 410# Test extracting only a single element, not a subvector 411--- 412name: extract_s16_build_vector_v2s64_v2s16_v2s16_offset32 413 414body: | 415 bb.0: 416 liveins: $vgpr0, $vgpr1 417 ; CHECK-LABEL: name: extract_s16_build_vector_v2s64_v2s16_v2s16_offset32 418 ; CHECK: [[COPY:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr0 419 ; CHECK: [[COPY1:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr1 420 ; CHECK: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[COPY1]](<2 x s16>) 421 ; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY [[BITCAST]](s32) 422 ; CHECK: $vgpr0 = COPY [[COPY2]](s32) 423 %0:_(<2 x s16>) = COPY $vgpr0 424 %1:_(<2 x s16>) = COPY $vgpr1 425 %2:_(<4 x s16>) = G_CONCAT_VECTORS %0, %1 426 %3:_(s16) = G_EXTRACT %2, 32 427 %4:_(s32) = G_ANYEXT %3 428 $vgpr0 = COPY %4 429... 430 431--- 432name: extract_s16_build_vector_v2s64_v2s16_v2s16_offset48 433 434body: | 435 bb.0: 436 liveins: $vgpr0, $vgpr1 437 ; CHECK-LABEL: name: extract_s16_build_vector_v2s64_v2s16_v2s16_offset48 438 ; CHECK: [[COPY:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr0 439 ; CHECK: [[COPY1:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr1 440 ; CHECK: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[COPY1]](<2 x s16>) 441 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16 442 ; CHECK: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST]], [[C]](s32) 443 ; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32) 444 ; CHECK: $vgpr0 = COPY [[COPY2]](s32) 445 %0:_(<2 x s16>) = COPY $vgpr0 446 %1:_(<2 x s16>) = COPY $vgpr1 447 %2:_(<4 x s16>) = G_CONCAT_VECTORS %0, %1 448 %3:_(s16) = G_EXTRACT %2, 48 449 %4:_(s32) = G_ANYEXT %3 450 $vgpr0 = COPY %4 451... 452 453# Test extracting less than an element 454--- 455name: extract_s8_build_vector_v2s64_v2s16_v2s16_offset48 456 457body: | 458 bb.0: 459 liveins: $vgpr0, $vgpr1 460 ; CHECK-LABEL: name: extract_s8_build_vector_v2s64_v2s16_v2s16_offset48 461 ; CHECK: [[COPY:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr0 462 ; CHECK: [[COPY1:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr1 463 ; CHECK: [[EXTRACT:%[0-9]+]]:_(s8) = G_EXTRACT [[COPY1]](<2 x s16>), 16 464 ; CHECK: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[EXTRACT]](s8) 465 ; CHECK: $vgpr0 = COPY [[ANYEXT]](s32) 466 %0:_(<2 x s16>) = COPY $vgpr0 467 %1:_(<2 x s16>) = COPY $vgpr1 468 %2:_(<4 x s16>) = G_CONCAT_VECTORS %0, %1 469 %3:_(s8) = G_EXTRACT %2, 48 470 %4:_(s32) = G_ANYEXT %3 471 $vgpr0 = COPY %4 472... 473