forked from OSchip/llvm-project
1114 lines
35 KiB
YAML
1114 lines
35 KiB
YAML
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
|
|
# RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=fiji -run-pass=legalizer -global-isel-abort=0 %s -o - | FileCheck %s
|
|
|
|
---
|
|
name: test_extract_s32_s64_offset0
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1
|
|
|
|
; CHECK-LABEL: name: test_extract_s32_s64_offset0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY]](s64), 0
|
|
; CHECK: $vgpr0 = COPY [[EXTRACT]](s32)
|
|
%0:_(s64) = COPY $vgpr0_vgpr1
|
|
%1:_(s32) = G_EXTRACT %0, 0
|
|
$vgpr0 = COPY %1
|
|
...
|
|
---
|
|
name: test_extract_s32_s64_offset32
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1
|
|
|
|
; CHECK-LABEL: name: test_extract_s32_s64_offset32
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY]](s64), 32
|
|
; CHECK: $vgpr0 = COPY [[EXTRACT]](s32)
|
|
%0:_(s64) = COPY $vgpr0_vgpr1
|
|
%1:_(s32) = G_EXTRACT %0, 32
|
|
$vgpr0 = COPY %1
|
|
...
|
|
|
|
---
|
|
name: test_extract_s8_s15_offset0
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1
|
|
|
|
; CHECK-LABEL: name: test_extract_s8_s15_offset0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
|
|
; CHECK: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s64)
|
|
; CHECK: $vgpr0 = COPY [[TRUNC]](s32)
|
|
%0:_(s64) = COPY $vgpr0_vgpr1
|
|
%1:_(s31) = G_TRUNC %0
|
|
%2:_(s8) = G_EXTRACT %1, 0
|
|
%3:_(s32) = G_ANYEXT %2
|
|
$vgpr0 = COPY %3
|
|
...
|
|
|
|
---
|
|
name: test_extract_s16_s31_offset0
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1
|
|
|
|
; CHECK-LABEL: name: test_extract_s16_s31_offset0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
|
|
; CHECK: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s64)
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[TRUNC]](s32)
|
|
; CHECK: $vgpr0 = COPY [[COPY1]](s32)
|
|
%0:_(s64) = COPY $vgpr0_vgpr1
|
|
%1:_(s31) = G_TRUNC %0
|
|
%2:_(s16) = G_EXTRACT %1, 0
|
|
%3:_(s32) = G_ANYEXT %2
|
|
$vgpr0 = COPY %3
|
|
...
|
|
|
|
---
|
|
name: test_extract_s32_s48_offset0
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1
|
|
|
|
; CHECK-LABEL: name: test_extract_s32_s48_offset0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY [[COPY]](s64)
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](s64), 0
|
|
; CHECK: $vgpr0 = COPY [[EXTRACT]](s32)
|
|
%0:_(s64) = COPY $vgpr0_vgpr1
|
|
%1:_(s48) = G_TRUNC %0
|
|
%2:_(s32) = G_EXTRACT %1, 0
|
|
$vgpr0 = COPY %2
|
|
...
|
|
|
|
---
|
|
name: test_extract_s32_s96_offset0
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2
|
|
|
|
; CHECK-LABEL: name: test_extract_s32_s96_offset0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s96) = COPY $vgpr0_vgpr1_vgpr2
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY]](s96), 0
|
|
; CHECK: $vgpr0 = COPY [[EXTRACT]](s32)
|
|
%0:_(s96) = COPY $vgpr0_vgpr1_vgpr2
|
|
%1:_(s32) = G_EXTRACT %0, 0
|
|
$vgpr0 = COPY %1
|
|
...
|
|
---
|
|
name: test_extract_s32_s96_offset32
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2
|
|
|
|
; CHECK-LABEL: name: test_extract_s32_s96_offset32
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s96) = COPY $vgpr0_vgpr1_vgpr2
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY]](s96), 32
|
|
; CHECK: $vgpr0 = COPY [[EXTRACT]](s32)
|
|
%0:_(s96) = COPY $vgpr0_vgpr1_vgpr2
|
|
%1:_(s32) = G_EXTRACT %0, 32
|
|
$vgpr0 = COPY %1
|
|
...
|
|
---
|
|
name: test_extract_s32_s96_offset64
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2
|
|
|
|
; CHECK-LABEL: name: test_extract_s32_s96_offset64
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s96) = COPY $vgpr0_vgpr1_vgpr2
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY]](s96), 64
|
|
; CHECK: $vgpr0 = COPY [[EXTRACT]](s32)
|
|
%0:_(s96) = COPY $vgpr0_vgpr1_vgpr2
|
|
%1:_(s32) = G_EXTRACT %0, 64
|
|
$vgpr0 = COPY %1
|
|
...
|
|
---
|
|
name: test_extract_s32_s128_offset0
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3
|
|
|
|
; CHECK-LABEL: name: test_extract_s32_s128_offset0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY]](s128), 0
|
|
; CHECK: $vgpr0 = COPY [[EXTRACT]](s32)
|
|
%0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(s32) = G_EXTRACT %0, 0
|
|
$vgpr0 = COPY %1
|
|
...
|
|
---
|
|
name: test_extract_s32_s128_offset32
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3
|
|
|
|
; CHECK-LABEL: name: test_extract_s32_s128_offset32
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY]](s128), 32
|
|
; CHECK: $vgpr0 = COPY [[EXTRACT]](s32)
|
|
%0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(s32) = G_EXTRACT %0, 32
|
|
$vgpr0 = COPY %1
|
|
...
|
|
---
|
|
name: test_extract_s32_s128_offset64
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3
|
|
|
|
; CHECK-LABEL: name: test_extract_s32_s128_offset64
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY]](s128), 64
|
|
; CHECK: $vgpr0 = COPY [[EXTRACT]](s32)
|
|
%0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(s32) = G_EXTRACT %0, 64
|
|
$vgpr0 = COPY %1
|
|
...
|
|
---
|
|
name: test_extract_s32_s128_offset96
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3
|
|
|
|
; CHECK-LABEL: name: test_extract_s32_s128_offset96
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY]](s128), 96
|
|
; CHECK: $vgpr0 = COPY [[EXTRACT]](s32)
|
|
%0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(s32) = G_EXTRACT %0, 96
|
|
$vgpr0 = COPY %1
|
|
...
|
|
|
|
---
|
|
name: test_extract_s32_v2s32_offset0
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1
|
|
|
|
; CHECK-LABEL: name: test_extract_s32_v2s32_offset0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr0_vgpr1
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY]](<2 x s32>), 0
|
|
; CHECK: $vgpr0 = COPY [[EXTRACT]](s32)
|
|
%0:_(<2 x s32>) = COPY $vgpr0_vgpr1
|
|
%1:_(s32) = G_EXTRACT %0, 0
|
|
$vgpr0 = COPY %1
|
|
...
|
|
---
|
|
name: test_extract_s32_v2s32_offset32
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1
|
|
|
|
; CHECK-LABEL: name: test_extract_s32_v2s32_offset32
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr0_vgpr1
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY]](<2 x s32>), 32
|
|
; CHECK: $vgpr0 = COPY [[EXTRACT]](s32)
|
|
%0:_(<2 x s32>) = COPY $vgpr0_vgpr1
|
|
%1:_(s32) = G_EXTRACT %0, 32
|
|
$vgpr0 = COPY %1
|
|
...
|
|
---
|
|
name: test_extract_s32_v3s32_offset0
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2
|
|
|
|
; CHECK-LABEL: name: test_extract_s32_v3s32_offset0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY]](<3 x s32>), 0
|
|
; CHECK: $vgpr0 = COPY [[EXTRACT]](s32)
|
|
%0:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
|
|
%1:_(s32) = G_EXTRACT %0, 0
|
|
$vgpr0 = COPY %1
|
|
...
|
|
---
|
|
name: test_extract_s32_v3s32_offset32
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2
|
|
|
|
; CHECK-LABEL: name: test_extract_s32_v3s32_offset32
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY]](<3 x s32>), 32
|
|
; CHECK: $vgpr0 = COPY [[EXTRACT]](s32)
|
|
%0:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
|
|
%1:_(s32) = G_EXTRACT %0, 32
|
|
$vgpr0 = COPY %1
|
|
...
|
|
---
|
|
name: test_extract_s32_v3s32_offset64
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2
|
|
|
|
; CHECK-LABEL: name: test_extract_s32_v3s32_offset64
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY]](<3 x s32>), 64
|
|
; CHECK: $vgpr0 = COPY [[EXTRACT]](s32)
|
|
%0:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
|
|
%1:_(s32) = G_EXTRACT %0, 64
|
|
$vgpr0 = COPY %1
|
|
...
|
|
---
|
|
name: test_extract_s32_v4s32_offset0
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3
|
|
|
|
; CHECK-LABEL: name: test_extract_s32_v4s32_offset0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY]](<4 x s32>), 0
|
|
; CHECK: $vgpr0 = COPY [[EXTRACT]](s32)
|
|
%0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(s32) = G_EXTRACT %0, 0
|
|
$vgpr0 = COPY %1
|
|
...
|
|
---
|
|
name: test_extract_s32_v4s32_offset32
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3
|
|
|
|
; CHECK-LABEL: name: test_extract_s32_v4s32_offset32
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY]](s128), 32
|
|
; CHECK: $vgpr0 = COPY [[EXTRACT]](s32)
|
|
%0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(s32) = G_EXTRACT %0, 32
|
|
$vgpr0 = COPY %1
|
|
...
|
|
---
|
|
name: test_extract_s32_v4s32_offset64
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3
|
|
|
|
; CHECK-LABEL: name: test_extract_s32_v4s32_offset64
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY]](s128), 64
|
|
; CHECK: $vgpr0 = COPY [[EXTRACT]](s32)
|
|
%0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(s32) = G_EXTRACT %0, 64
|
|
$vgpr0 = COPY %1
|
|
...
|
|
---
|
|
name: test_extract_s32_v4s32_offset96
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3
|
|
|
|
; CHECK-LABEL: name: test_extract_s32_v4s32_offset96
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY]](s128), 96
|
|
; CHECK: $vgpr0 = COPY [[EXTRACT]](s32)
|
|
%0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(s32) = G_EXTRACT %0, 96
|
|
$vgpr0 = COPY %1
|
|
...
|
|
---
|
|
name: test_extract_v2s32_v4s32_offset0
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3
|
|
|
|
; CHECK-LABEL: name: test_extract_v2s32_v4s32_offset0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(<2 x s32>) = G_EXTRACT [[COPY]](<4 x s32>), 0
|
|
; CHECK: $vgpr0_vgpr1 = COPY [[EXTRACT]](<2 x s32>)
|
|
%0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(<2 x s32>) = G_EXTRACT %0, 0
|
|
$vgpr0_vgpr1 = COPY %1
|
|
...
|
|
|
|
---
|
|
name: test_extract_v2s32_v4s32_offset32
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3
|
|
|
|
; CHECK-LABEL: name: test_extract_v2s32_v4s32_offset32
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(<2 x s32>) = G_EXTRACT [[COPY]](<4 x s32>), 32
|
|
; CHECK: $vgpr0_vgpr1 = COPY [[EXTRACT]](<2 x s32>)
|
|
%0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(<2 x s32>) = G_EXTRACT %0, 32
|
|
$vgpr0_vgpr1 = COPY %1
|
|
...
|
|
|
|
---
|
|
name: test_extract_v2s32_v4s32_offset64
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3
|
|
|
|
; CHECK-LABEL: name: test_extract_v2s32_v4s32_offset64
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(<2 x s32>) = G_EXTRACT [[COPY]](<4 x s32>), 64
|
|
; CHECK: $vgpr0_vgpr1 = COPY [[EXTRACT]](<2 x s32>)
|
|
%0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(<2 x s32>) = G_EXTRACT %0, 64
|
|
$vgpr0_vgpr1 = COPY %1
|
|
...
|
|
---
|
|
name: test_extract_s64_v4s32_offset0
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3
|
|
|
|
; CHECK-LABEL: name: test_extract_s64_v4s32_offset0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(s64) = G_EXTRACT [[COPY]](<4 x s32>), 0
|
|
; CHECK: $vgpr0_vgpr1 = COPY [[EXTRACT]](s64)
|
|
%0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(s64) = G_EXTRACT %0, 0
|
|
$vgpr0_vgpr1 = COPY %1
|
|
...
|
|
|
|
---
|
|
name: test_extract_s64_v4s32_offset32
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3
|
|
|
|
; CHECK-LABEL: name: test_extract_s64_v4s32_offset32
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(s64) = G_EXTRACT [[COPY]](<4 x s32>), 32
|
|
; CHECK: $vgpr0_vgpr1 = COPY [[EXTRACT]](s64)
|
|
%0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(s64) = G_EXTRACT %0, 32
|
|
$vgpr0_vgpr1 = COPY %1
|
|
...
|
|
|
|
---
|
|
name: test_extract_s64_v4s32_offset64
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3
|
|
|
|
; CHECK-LABEL: name: test_extract_s64_v4s32_offset64
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(s64) = G_EXTRACT [[COPY]](<4 x s32>), 64
|
|
; CHECK: $vgpr0_vgpr1 = COPY [[EXTRACT]](s64)
|
|
%0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(s64) = G_EXTRACT %0, 64
|
|
$vgpr0_vgpr1 = COPY %1
|
|
...
|
|
---
|
|
name: test_extract_p0_v4s32_offset0
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3
|
|
|
|
; CHECK-LABEL: name: test_extract_p0_v4s32_offset0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(p0) = G_EXTRACT [[COPY]](<4 x s32>), 0
|
|
; CHECK: $vgpr0_vgpr1 = COPY [[EXTRACT]](p0)
|
|
%0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(p0) = G_EXTRACT %0, 0
|
|
$vgpr0_vgpr1 = COPY %1
|
|
...
|
|
|
|
---
|
|
name: test_extract_p0_v4s32_offset32
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3
|
|
|
|
; CHECK-LABEL: name: test_extract_p0_v4s32_offset32
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(p0) = G_EXTRACT [[COPY]](<4 x s32>), 32
|
|
; CHECK: $vgpr0_vgpr1 = COPY [[EXTRACT]](p0)
|
|
%0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(p0) = G_EXTRACT %0, 32
|
|
$vgpr0_vgpr1 = COPY %1
|
|
...
|
|
|
|
---
|
|
name: test_extract_p0_v4s32_offset64
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3
|
|
|
|
; CHECK-LABEL: name: test_extract_p0_v4s32_offset64
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(p0) = G_EXTRACT [[COPY]](<4 x s32>), 64
|
|
; CHECK: $vgpr0_vgpr1 = COPY [[EXTRACT]](p0)
|
|
%0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(p0) = G_EXTRACT %0, 64
|
|
$vgpr0_vgpr1 = COPY %1
|
|
...
|
|
|
|
---
|
|
name: extract_s8_v4s8_offset0
|
|
body: |
|
|
bb.0:
|
|
; CHECK-LABEL: name: extract_s8_v4s8_offset0
|
|
; CHECK: [[DEF:%[0-9]+]]:_(<4 x s32>) = G_IMPLICIT_DEF
|
|
; CHECK: [[TRUNC:%[0-9]+]]:_(<4 x s16>) = G_TRUNC [[DEF]](<4 x s32>)
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(s16) = G_EXTRACT [[TRUNC]](<4 x s16>), 0
|
|
; CHECK: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[EXTRACT]](s16)
|
|
; CHECK: $vgpr0 = COPY [[ANYEXT]](s32)
|
|
%0:_(<4 x s8>) = G_IMPLICIT_DEF
|
|
%1:_(s8) = G_EXTRACT %0, 0
|
|
%2:_(s32) = G_ANYEXT %1
|
|
$vgpr0 = COPY %2
|
|
...
|
|
|
|
---
|
|
name: extract_s8_v4s8_offset8
|
|
body: |
|
|
bb.0:
|
|
; CHECK-LABEL: name: extract_s8_v4s8_offset8
|
|
; CHECK: [[DEF:%[0-9]+]]:_(<4 x s32>) = G_IMPLICIT_DEF
|
|
; CHECK: [[TRUNC:%[0-9]+]]:_(<4 x s16>) = G_TRUNC [[DEF]](<4 x s32>)
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(s16) = G_EXTRACT [[TRUNC]](<4 x s16>), 16
|
|
; CHECK: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[EXTRACT]](s16)
|
|
; CHECK: $vgpr0 = COPY [[ANYEXT]](s32)
|
|
%0:_(<4 x s8>) = G_IMPLICIT_DEF
|
|
%1:_(s8) = G_EXTRACT %0, 8
|
|
%2:_(s32) = G_ANYEXT %1
|
|
$vgpr0 = COPY %2
|
|
...
|
|
|
|
---
|
|
name: extract_s8_v4s8_offset16
|
|
body: |
|
|
bb.0:
|
|
; CHECK-LABEL: name: extract_s8_v4s8_offset16
|
|
; CHECK: [[DEF:%[0-9]+]]:_(<4 x s32>) = G_IMPLICIT_DEF
|
|
; CHECK: [[TRUNC:%[0-9]+]]:_(<4 x s16>) = G_TRUNC [[DEF]](<4 x s32>)
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(s16) = G_EXTRACT [[TRUNC]](<4 x s16>), 32
|
|
; CHECK: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[EXTRACT]](s16)
|
|
; CHECK: $vgpr0 = COPY [[ANYEXT]](s32)
|
|
%0:_(<4 x s8>) = G_IMPLICIT_DEF
|
|
%1:_(s8) = G_EXTRACT %0, 16
|
|
%2:_(s32) = G_ANYEXT %1
|
|
$vgpr0 = COPY %2
|
|
...
|
|
|
|
---
|
|
name: extract_s8_v4s8_offset24
|
|
body: |
|
|
bb.0:
|
|
; CHECK-LABEL: name: extract_s8_v4s8_offset24
|
|
; CHECK: [[DEF:%[0-9]+]]:_(<4 x s32>) = G_IMPLICIT_DEF
|
|
; CHECK: [[TRUNC:%[0-9]+]]:_(<4 x s16>) = G_TRUNC [[DEF]](<4 x s32>)
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(s16) = G_EXTRACT [[TRUNC]](<4 x s16>), 48
|
|
; CHECK: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[EXTRACT]](s16)
|
|
; CHECK: $vgpr0 = COPY [[ANYEXT]](s32)
|
|
%0:_(<4 x s8>) = G_IMPLICIT_DEF
|
|
%1:_(s8) = G_EXTRACT %0, 24
|
|
%2:_(s32) = G_ANYEXT %1
|
|
$vgpr0 = COPY %2
|
|
...
|
|
|
|
---
|
|
name: extract_s8_v3s8_offset16
|
|
body: |
|
|
bb.0:
|
|
; CHECK-LABEL: name: extract_s8_v3s8_offset16
|
|
; CHECK: [[DEF:%[0-9]+]]:_(<4 x s32>) = G_IMPLICIT_DEF
|
|
; CHECK: [[TRUNC:%[0-9]+]]:_(<4 x s8>) = G_TRUNC [[DEF]](<4 x s32>)
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(<3 x s8>) = G_EXTRACT [[TRUNC]](<4 x s8>), 0
|
|
; CHECK: [[UV:%[0-9]+]]:_(s8), [[UV1:%[0-9]+]]:_(s8), [[UV2:%[0-9]+]]:_(s8) = G_UNMERGE_VALUES [[EXTRACT]](<3 x s8>)
|
|
; CHECK: [[ANYEXT:%[0-9]+]]:_(s16) = G_ANYEXT [[UV]](s8)
|
|
; CHECK: [[ANYEXT1:%[0-9]+]]:_(s16) = G_ANYEXT [[UV1]](s8)
|
|
; CHECK: [[ANYEXT2:%[0-9]+]]:_(s16) = G_ANYEXT [[UV2]](s8)
|
|
; CHECK: [[DEF1:%[0-9]+]]:_(s16) = G_IMPLICIT_DEF
|
|
; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s16>) = G_BUILD_VECTOR [[ANYEXT]](s16), [[ANYEXT1]](s16)
|
|
; CHECK: [[BUILD_VECTOR1:%[0-9]+]]:_(<2 x s16>) = G_BUILD_VECTOR [[ANYEXT2]](s16), [[DEF1]](s16)
|
|
; CHECK: [[CONCAT_VECTORS:%[0-9]+]]:_(<4 x s16>) = G_CONCAT_VECTORS [[BUILD_VECTOR]](<2 x s16>), [[BUILD_VECTOR1]](<2 x s16>)
|
|
; CHECK: [[EXTRACT1:%[0-9]+]]:_(<3 x s16>) = G_EXTRACT [[CONCAT_VECTORS]](<4 x s16>), 0
|
|
; CHECK: [[DEF2:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF2]], [[EXTRACT1]](<3 x s16>), 0
|
|
; CHECK: [[EXTRACT2:%[0-9]+]]:_(s16) = G_EXTRACT [[INSERT]](<4 x s16>), 32
|
|
; CHECK: [[ANYEXT3:%[0-9]+]]:_(s32) = G_ANYEXT [[EXTRACT2]](s16)
|
|
; CHECK: $vgpr0 = COPY [[ANYEXT3]](s32)
|
|
%0:_(<3 x s8>) = G_IMPLICIT_DEF
|
|
%1:_(s8) = G_EXTRACT %0, 16
|
|
%2:_(s32) = G_ANYEXT %1
|
|
$vgpr0 = COPY %2
|
|
...
|
|
|
|
---
|
|
name: extract_s8_v5s1_offset4
|
|
body: |
|
|
bb.0:
|
|
; CHECK-LABEL: name: extract_s8_v5s1_offset4
|
|
; CHECK: [[DEF:%[0-9]+]]:_(<6 x s32>) = G_IMPLICIT_DEF
|
|
; CHECK: [[TRUNC:%[0-9]+]]:_(<6 x s1>) = G_TRUNC [[DEF]](<6 x s32>)
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(<5 x s1>) = G_EXTRACT [[TRUNC]](<6 x s1>), 0
|
|
; CHECK: [[UV:%[0-9]+]]:_(s1), [[UV1:%[0-9]+]]:_(s1), [[UV2:%[0-9]+]]:_(s1), [[UV3:%[0-9]+]]:_(s1), [[UV4:%[0-9]+]]:_(s1) = G_UNMERGE_VALUES [[EXTRACT]](<5 x s1>)
|
|
; CHECK: [[ANYEXT:%[0-9]+]]:_(s16) = G_ANYEXT [[UV]](s1)
|
|
; CHECK: [[ANYEXT1:%[0-9]+]]:_(s16) = G_ANYEXT [[UV1]](s1)
|
|
; CHECK: [[ANYEXT2:%[0-9]+]]:_(s16) = G_ANYEXT [[UV2]](s1)
|
|
; CHECK: [[ANYEXT3:%[0-9]+]]:_(s16) = G_ANYEXT [[UV3]](s1)
|
|
; CHECK: [[ANYEXT4:%[0-9]+]]:_(s16) = G_ANYEXT [[UV4]](s1)
|
|
; CHECK: [[DEF1:%[0-9]+]]:_(s16) = G_IMPLICIT_DEF
|
|
; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s16>) = G_BUILD_VECTOR [[ANYEXT]](s16), [[ANYEXT1]](s16)
|
|
; CHECK: [[BUILD_VECTOR1:%[0-9]+]]:_(<2 x s16>) = G_BUILD_VECTOR [[ANYEXT2]](s16), [[ANYEXT3]](s16)
|
|
; CHECK: [[BUILD_VECTOR2:%[0-9]+]]:_(<2 x s16>) = G_BUILD_VECTOR [[ANYEXT4]](s16), [[DEF1]](s16)
|
|
; CHECK: [[CONCAT_VECTORS:%[0-9]+]]:_(<6 x s16>) = G_CONCAT_VECTORS [[BUILD_VECTOR]](<2 x s16>), [[BUILD_VECTOR1]](<2 x s16>), [[BUILD_VECTOR2]](<2 x s16>)
|
|
; CHECK: [[EXTRACT1:%[0-9]+]]:_(<5 x s16>) = G_EXTRACT [[CONCAT_VECTORS]](<6 x s16>), 0
|
|
; CHECK: [[DEF2:%[0-9]+]]:_(<6 x s32>) = G_IMPLICIT_DEF
|
|
; CHECK: [[TRUNC1:%[0-9]+]]:_(<6 x s16>) = G_TRUNC [[DEF2]](<6 x s32>)
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(<6 x s16>) = G_INSERT [[TRUNC1]], [[EXTRACT1]](<5 x s16>), 0
|
|
; CHECK: [[EXTRACT2:%[0-9]+]]:_(s16) = G_EXTRACT [[INSERT]](<6 x s16>), 64
|
|
; CHECK: [[ANYEXT5:%[0-9]+]]:_(s32) = G_ANYEXT [[EXTRACT2]](s16)
|
|
; CHECK: $vgpr0 = COPY [[ANYEXT5]](s32)
|
|
%0:_(<5 x s1>) = G_IMPLICIT_DEF
|
|
%1:_(s1) = G_EXTRACT %0, 4
|
|
%2:_(s32) = G_ANYEXT %1
|
|
$vgpr0 = COPY %2
|
|
...
|
|
|
|
---
|
|
name: extract_v2s16_v4s16_offset32
|
|
body: |
|
|
bb.0:
|
|
; CHECK-LABEL: name: extract_v2s16_v4s16_offset32
|
|
; CHECK: [[DEF:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(<2 x s16>) = G_EXTRACT [[DEF]](<4 x s16>), 32
|
|
; CHECK: $vgpr0 = COPY [[EXTRACT]](<2 x s16>)
|
|
%0:_(<4 x s16>) = G_IMPLICIT_DEF
|
|
%1:_(<2 x s16>) = G_EXTRACT %0, 32
|
|
$vgpr0 = COPY %1
|
|
...
|
|
|
|
---
|
|
name: extract_v2s16_v6s16_offset32
|
|
body: |
|
|
bb.0:
|
|
; CHECK-LABEL: name: extract_v2s16_v6s16_offset32
|
|
; CHECK: [[DEF:%[0-9]+]]:_(<6 x s32>) = G_IMPLICIT_DEF
|
|
; CHECK: [[TRUNC:%[0-9]+]]:_(<6 x s16>) = G_TRUNC [[DEF]](<6 x s32>)
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(<2 x s16>) = G_EXTRACT [[TRUNC]](<6 x s16>), 32
|
|
; CHECK: $vgpr0 = COPY [[EXTRACT]](<2 x s16>)
|
|
%0:_(<6 x s16>) = G_IMPLICIT_DEF
|
|
%1:_(<2 x s16>) = G_EXTRACT %0, 32
|
|
$vgpr0 = COPY %1
|
|
...
|
|
|
|
---
|
|
name: test_extract_s8_s16_offset0
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0
|
|
; CHECK-LABEL: name: test_extract_s8_s16_offset0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
|
|
; CHECK: $vgpr0 = COPY [[COPY1]](s32)
|
|
%0:_(s32) = COPY $vgpr0
|
|
%1:_(s16) = G_TRUNC %0
|
|
%2:_(s8) = G_EXTRACT %1, 0
|
|
%3:_(s32) = G_ANYEXT %2
|
|
$vgpr0 = COPY %3
|
|
...
|
|
|
|
---
|
|
name: test_extract_s8_s16_offset1
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0
|
|
; CHECK-LABEL: name: test_extract_s8_s16_offset1
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
|
|
; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY]](s32)
|
|
; CHECK: [[C:%[0-9]+]]:_(s16) = G_CONSTANT i16 1
|
|
; CHECK: [[LSHR:%[0-9]+]]:_(s16) = G_LSHR [[TRUNC]], [[C]](s16)
|
|
; CHECK: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[LSHR]](s16)
|
|
; CHECK: $vgpr0 = COPY [[ANYEXT]](s32)
|
|
%0:_(s32) = COPY $vgpr0
|
|
%1:_(s16) = G_TRUNC %0
|
|
%2:_(s8) = G_EXTRACT %1, 1
|
|
%3:_(s32) = G_ANYEXT %2
|
|
$vgpr0 = COPY %3
|
|
...
|
|
|
|
---
|
|
name: test_extract_s8_s16_offset8
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0
|
|
; CHECK-LABEL: name: test_extract_s8_s16_offset8
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
|
|
; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY]](s32)
|
|
; CHECK: [[C:%[0-9]+]]:_(s16) = G_CONSTANT i16 8
|
|
; CHECK: [[LSHR:%[0-9]+]]:_(s16) = G_LSHR [[TRUNC]], [[C]](s16)
|
|
; CHECK: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[LSHR]](s16)
|
|
; CHECK: $vgpr0 = COPY [[ANYEXT]](s32)
|
|
%0:_(s32) = COPY $vgpr0
|
|
%1:_(s16) = G_TRUNC %0
|
|
%2:_(s8) = G_EXTRACT %1, 8
|
|
%3:_(s32) = G_ANYEXT %2
|
|
$vgpr0 = COPY %3
|
|
...
|
|
|
|
---
|
|
name: test_extract_s8_s32_offset0
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0
|
|
; CHECK-LABEL: name: test_extract_s8_s32_offset0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
|
|
; CHECK: $vgpr0 = COPY [[COPY1]](s32)
|
|
%0:_(s32) = COPY $vgpr0
|
|
%1:_(s8) = G_EXTRACT %0, 0
|
|
%2:_(s32) = G_ANYEXT %1
|
|
$vgpr0 = COPY %2
|
|
...
|
|
|
|
---
|
|
name: test_extract_s8_s32_offset1
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0
|
|
; CHECK-LABEL: name: test_extract_s8_s32_offset1
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
|
|
; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
|
|
; CHECK: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[C]](s32)
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
|
|
; CHECK: $vgpr0 = COPY [[COPY1]](s32)
|
|
%0:_(s32) = COPY $vgpr0
|
|
%1:_(s8) = G_EXTRACT %0, 1
|
|
%2:_(s32) = G_ANYEXT %1
|
|
$vgpr0 = COPY %2
|
|
...
|
|
|
|
---
|
|
name: test_extract_s8_s32_offset8
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0
|
|
; CHECK-LABEL: name: test_extract_s8_s32_offset8
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
|
|
; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
|
|
; CHECK: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[C]](s32)
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
|
|
; CHECK: $vgpr0 = COPY [[COPY1]](s32)
|
|
%0:_(s32) = COPY $vgpr0
|
|
%1:_(s8) = G_EXTRACT %0, 8
|
|
%2:_(s32) = G_ANYEXT %1
|
|
$vgpr0 = COPY %2
|
|
...
|
|
|
|
---
|
|
name: test_extract_s8_s32_offset16
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0
|
|
; CHECK-LABEL: name: test_extract_s8_s32_offset16
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
|
|
; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
|
|
; CHECK: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[C]](s32)
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
|
|
; CHECK: $vgpr0 = COPY [[COPY1]](s32)
|
|
%0:_(s32) = COPY $vgpr0
|
|
%1:_(s8) = G_EXTRACT %0, 16
|
|
%2:_(s32) = G_ANYEXT %1
|
|
$vgpr0 = COPY %2
|
|
...
|
|
|
|
---
|
|
name: test_extract_s8_s32_offset24
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0
|
|
; CHECK-LABEL: name: test_extract_s8_s32_offset24
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
|
|
; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
|
|
; CHECK: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[C]](s32)
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
|
|
; CHECK: $vgpr0 = COPY [[COPY1]](s32)
|
|
%0:_(s32) = COPY $vgpr0
|
|
%1:_(s8) = G_EXTRACT %0, 16
|
|
%2:_(s32) = G_ANYEXT %1
|
|
$vgpr0 = COPY %2
|
|
...
|
|
|
|
---
|
|
name: test_extract_s8_p3_offset0
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0
|
|
; CHECK-LABEL: name: test_extract_s8_p3_offset0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0
|
|
; CHECK: [[PTRTOINT:%[0-9]+]]:_(s32) = G_PTRTOINT [[COPY]](p3)
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[PTRTOINT]](s32)
|
|
; CHECK: $vgpr0 = COPY [[COPY1]](s32)
|
|
%0:_(p3) = COPY $vgpr0
|
|
%1:_(s8) = G_EXTRACT %0, 0
|
|
%2:_(s32) = G_ANYEXT %1
|
|
$vgpr0 = COPY %2
|
|
...
|
|
|
|
---
|
|
name: test_extract_s8_p3_offset8
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0
|
|
; CHECK-LABEL: name: test_extract_s8_p3_offset8
|
|
; CHECK: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0
|
|
; CHECK: [[PTRTOINT:%[0-9]+]]:_(s32) = G_PTRTOINT [[COPY]](p3)
|
|
; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
|
|
; CHECK: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT]], [[C]](s32)
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
|
|
; CHECK: $vgpr0 = COPY [[COPY1]](s32)
|
|
%0:_(p3) = COPY $vgpr0
|
|
%1:_(s8) = G_EXTRACT %0, 8
|
|
%2:_(s32) = G_ANYEXT %1
|
|
$vgpr0 = COPY %2
|
|
...
|
|
|
|
---
|
|
name: test_extract_s1_s8_offset0
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0
|
|
; CHECK-LABEL: name: test_extract_s1_s8_offset0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
|
|
; CHECK: $vgpr0 = COPY [[COPY1]](s32)
|
|
%0:_(s32) = COPY $vgpr0
|
|
%1:_(s8) = G_TRUNC %0
|
|
%2:_(s1) = G_EXTRACT %1, 0
|
|
%3:_(s32) = G_ANYEXT %2
|
|
$vgpr0 = COPY %3
|
|
...
|
|
|
|
---
|
|
name: test_extract_s1_s8_offset2
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0
|
|
; CHECK-LABEL: name: test_extract_s1_s8_offset2
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
|
|
; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY]](s32)
|
|
; CHECK: [[C:%[0-9]+]]:_(s16) = G_CONSTANT i16 2
|
|
; CHECK: [[LSHR:%[0-9]+]]:_(s16) = G_LSHR [[TRUNC]], [[C]](s16)
|
|
; CHECK: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[LSHR]](s16)
|
|
; CHECK: $vgpr0 = COPY [[ANYEXT]](s32)
|
|
%0:_(s32) = COPY $vgpr0
|
|
%1:_(s8) = G_TRUNC %0
|
|
%2:_(s1) = G_EXTRACT %1, 2
|
|
%3:_(s32) = G_ANYEXT %2
|
|
$vgpr0 = COPY %3
|
|
...
|
|
|
|
---
|
|
name: test_extract_s8_s64_offset2
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1
|
|
; CHECK-LABEL: name: test_extract_s8_s64_offset2
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
|
|
; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2
|
|
; CHECK: [[LSHR:%[0-9]+]]:_(s64) = G_LSHR [[COPY]], [[C]](s32)
|
|
; CHECK: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[LSHR]](s64)
|
|
; CHECK: $vgpr0 = COPY [[TRUNC]](s32)
|
|
%0:_(s64) = COPY $vgpr0_vgpr1
|
|
%1:_(s8) = G_EXTRACT %0, 2
|
|
%2:_(s32) = G_ANYEXT %1
|
|
$vgpr0 = COPY %2
|
|
...
|
|
|
|
---
|
|
name: extract_s16_v3s16_offset0
|
|
body: |
|
|
bb.0:
|
|
|
|
; CHECK-LABEL: name: extract_s16_v3s16_offset0
|
|
; CHECK: [[DEF:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(<3 x s16>) = G_EXTRACT [[DEF]](<4 x s16>), 0
|
|
; CHECK: [[DEF1:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF1]], [[EXTRACT]](<3 x s16>), 0
|
|
; CHECK: [[EXTRACT1:%[0-9]+]]:_(s16) = G_EXTRACT [[INSERT]](<4 x s16>), 0
|
|
; CHECK: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[EXTRACT1]](s16)
|
|
; CHECK: $vgpr0 = COPY [[ANYEXT]](s32)
|
|
%0:_(<3 x s16>) = G_IMPLICIT_DEF
|
|
%1:_(s16) = G_EXTRACT %0, 0
|
|
%2:_(s32) = G_ANYEXT %1
|
|
$vgpr0 = COPY %2
|
|
...
|
|
|
|
---
|
|
name: test_extract_s8_s64_offset16
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1
|
|
; CHECK-LABEL: name: test_extract_s8_s64_offset16
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
|
|
; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
|
|
; CHECK: [[LSHR:%[0-9]+]]:_(s64) = G_LSHR [[COPY]], [[C]](s32)
|
|
; CHECK: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[LSHR]](s64)
|
|
; CHECK: $vgpr0 = COPY [[TRUNC]](s32)
|
|
%0:_(s64) = COPY $vgpr0_vgpr1
|
|
%1:_(s8) = G_EXTRACT %0, 16
|
|
%2:_(s32) = G_ANYEXT %1
|
|
$vgpr0 = COPY %2
|
|
...
|
|
|
|
---
|
|
name: test_extract_s16_s64_offset16
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1
|
|
; CHECK-LABEL: name: test_extract_s16_s64_offset16
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(s16) = G_EXTRACT [[COPY]](s64), 16
|
|
; CHECK: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[EXTRACT]](s16)
|
|
; CHECK: $vgpr0 = COPY [[ANYEXT]](s32)
|
|
%0:_(s64) = COPY $vgpr0_vgpr1
|
|
%1:_(s16) = G_EXTRACT %0, 16
|
|
%2:_(s32) = G_ANYEXT %1
|
|
$vgpr0 = COPY %2
|
|
...
|
|
|
|
---
|
|
name: test_extract_s16_s64_offset32
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1
|
|
; CHECK-LABEL: name: test_extract_s16_s64_offset32
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(s16) = G_EXTRACT [[COPY]](s64), 32
|
|
; CHECK: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[EXTRACT]](s16)
|
|
; CHECK: $vgpr0 = COPY [[ANYEXT]](s32)
|
|
%0:_(s64) = COPY $vgpr0_vgpr1
|
|
%1:_(s16) = G_EXTRACT %0, 32
|
|
%2:_(s32) = G_ANYEXT %1
|
|
$vgpr0 = COPY %2
|
|
...
|
|
|
|
---
|
|
name: test_extract_s16_s64_offset48
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1
|
|
; CHECK-LABEL: name: test_extract_s16_s64_offset48
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(s16) = G_EXTRACT [[COPY]](s64), 48
|
|
; CHECK: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[EXTRACT]](s16)
|
|
; CHECK: $vgpr0 = COPY [[ANYEXT]](s32)
|
|
%0:_(s64) = COPY $vgpr0_vgpr1
|
|
%1:_(s16) = G_EXTRACT %0, 48
|
|
%2:_(s32) = G_ANYEXT %1
|
|
$vgpr0 = COPY %2
|
|
...
|
|
|
|
---
|
|
name: extract_v2s16_v3s16_offset0
|
|
body: |
|
|
bb.0:
|
|
|
|
; CHECK-LABEL: name: extract_v2s16_v3s16_offset0
|
|
; CHECK: [[DEF:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(<3 x s16>) = G_EXTRACT [[DEF]](<4 x s16>), 0
|
|
; CHECK: [[DEF1:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF1]], [[EXTRACT]](<3 x s16>), 0
|
|
; CHECK: [[EXTRACT1:%[0-9]+]]:_(<2 x s16>) = G_EXTRACT [[INSERT]](<4 x s16>), 0
|
|
; CHECK: $vgpr0 = COPY [[EXTRACT1]](<2 x s16>)
|
|
%0:_(<3 x s16>) = G_IMPLICIT_DEF
|
|
%1:_(<2 x s16>) = G_EXTRACT %0, 0
|
|
$vgpr0 = COPY %1
|
|
...
|
|
|
|
---
|
|
name: extract_v2s16_v5s16_offset0
|
|
body: |
|
|
bb.0:
|
|
|
|
; CHECK-LABEL: name: extract_v2s16_v5s16_offset0
|
|
; CHECK: [[DEF:%[0-9]+]]:_(<6 x s32>) = G_IMPLICIT_DEF
|
|
; CHECK: [[TRUNC:%[0-9]+]]:_(<6 x s16>) = G_TRUNC [[DEF]](<6 x s32>)
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(<5 x s16>) = G_EXTRACT [[TRUNC]](<6 x s16>), 0
|
|
; CHECK: [[DEF1:%[0-9]+]]:_(<6 x s32>) = G_IMPLICIT_DEF
|
|
; CHECK: [[TRUNC1:%[0-9]+]]:_(<6 x s16>) = G_TRUNC [[DEF1]](<6 x s32>)
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(<6 x s16>) = G_INSERT [[TRUNC1]], [[EXTRACT]](<5 x s16>), 0
|
|
; CHECK: [[EXTRACT1:%[0-9]+]]:_(<2 x s16>) = G_EXTRACT [[INSERT]](<6 x s16>), 0
|
|
; CHECK: $vgpr0 = COPY [[EXTRACT1]](<2 x s16>)
|
|
%0:_(<5 x s16>) = G_IMPLICIT_DEF
|
|
%1:_(<2 x s16>) = G_EXTRACT %0, 0
|
|
$vgpr0 = COPY %1
|
|
...
|
|
|
|
---
|
|
name: extract_s16_v2s16_offset0
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0
|
|
|
|
; CHECK-LABEL: name: extract_s16_v2s16_offset0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr0
|
|
; CHECK: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[COPY]](<2 x s16>)
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[BITCAST]](s32)
|
|
; CHECK: $vgpr0 = COPY [[COPY1]](s32)
|
|
%0:_(<2 x s16>) = COPY $vgpr0
|
|
%1:_(s16) = G_EXTRACT %0, 0
|
|
%2:_(s32) = G_ANYEXT %1
|
|
$vgpr0 = COPY %2
|
|
...
|
|
|
|
---
|
|
name: extract_s16_v2s16_offset1
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0
|
|
|
|
; CHECK-LABEL: name: extract_s16_v2s16_offset1
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr0
|
|
; CHECK: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[COPY]](<2 x s16>)
|
|
; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
|
|
; CHECK: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST]], [[C]](s32)
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
|
|
; CHECK: $vgpr0 = COPY [[COPY1]](s32)
|
|
%0:_(<2 x s16>) = COPY $vgpr0
|
|
%1:_(s16) = G_EXTRACT %0, 1
|
|
%2:_(s32) = G_ANYEXT %1
|
|
$vgpr0 = COPY %2
|
|
...
|
|
|
|
---
|
|
name: extract_s16_v2s16_offset8
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0
|
|
|
|
; CHECK-LABEL: name: extract_s16_v2s16_offset8
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr0
|
|
; CHECK: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[COPY]](<2 x s16>)
|
|
; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
|
|
; CHECK: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST]], [[C]](s32)
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
|
|
; CHECK: $vgpr0 = COPY [[COPY1]](s32)
|
|
%0:_(<2 x s16>) = COPY $vgpr0
|
|
%1:_(s16) = G_EXTRACT %0, 8
|
|
%2:_(s32) = G_ANYEXT %1
|
|
$vgpr0 = COPY %2
|
|
...
|
|
|
|
---
|
|
name: extract_s16_v2s16_offset16
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0
|
|
|
|
; CHECK-LABEL: name: extract_s16_v2s16_offset16
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr0
|
|
; CHECK: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[COPY]](<2 x s16>)
|
|
; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
|
|
; CHECK: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST]], [[C]](s32)
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
|
|
; CHECK: $vgpr0 = COPY [[COPY1]](s32)
|
|
%0:_(<2 x s16>) = COPY $vgpr0
|
|
%1:_(s16) = G_EXTRACT %0, 16
|
|
%2:_(s32) = G_ANYEXT %1
|
|
$vgpr0 = COPY %2
|
|
...
|
|
|
|
---
|
|
name: extract_s16_s32_offset0
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0
|
|
|
|
; CHECK-LABEL: name: extract_s16_s32_offset0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
|
|
; CHECK: $vgpr0 = COPY [[COPY1]](s32)
|
|
%0:_(s32) = COPY $vgpr0
|
|
%1:_(s16) = G_EXTRACT %0, 0
|
|
%2:_(s32) = G_ANYEXT %1
|
|
$vgpr0 = COPY %2
|
|
...
|
|
|
|
---
|
|
name: extract_s16_s32_offset1
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0
|
|
|
|
; CHECK-LABEL: name: extract_s16_s32_offset1
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
|
|
; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
|
|
; CHECK: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[C]](s32)
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
|
|
; CHECK: $vgpr0 = COPY [[COPY1]](s32)
|
|
%0:_(s32) = COPY $vgpr0
|
|
%1:_(s16) = G_EXTRACT %0, 1
|
|
%2:_(s32) = G_ANYEXT %1
|
|
$vgpr0 = COPY %2
|
|
...
|
|
|
|
---
|
|
name: extract_s16_s32_offset8
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0
|
|
|
|
; CHECK-LABEL: name: extract_s16_s32_offset8
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
|
|
; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
|
|
; CHECK: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[C]](s32)
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
|
|
; CHECK: $vgpr0 = COPY [[COPY1]](s32)
|
|
%0:_(s32) = COPY $vgpr0
|
|
%1:_(s16) = G_EXTRACT %0, 8
|
|
%2:_(s32) = G_ANYEXT %1
|
|
$vgpr0 = COPY %2
|
|
...
|
|
|
|
---
|
|
name: extract_s16_s32_offset16
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0
|
|
|
|
; CHECK-LABEL: name: extract_s16_s32_offset16
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
|
|
; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
|
|
; CHECK: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[C]](s32)
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
|
|
; CHECK: $vgpr0 = COPY [[COPY1]](s32)
|
|
%0:_(s32) = COPY $vgpr0
|
|
%1:_(s16) = G_EXTRACT %0, 16
|
|
%2:_(s32) = G_ANYEXT %1
|
|
$vgpr0 = COPY %2
|
|
...
|
|
|
|
---
|
|
name: extract_s16_p3_offset0
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0
|
|
|
|
; CHECK-LABEL: name: extract_s16_p3_offset0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(s16) = G_EXTRACT [[COPY]](p3), 0
|
|
; CHECK: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[EXTRACT]](s16)
|
|
; CHECK: $vgpr0 = COPY [[ANYEXT]](s32)
|
|
%0:_(p3) = COPY $vgpr0
|
|
%1:_(s16) = G_EXTRACT %0, 0
|
|
%2:_(s32) = G_ANYEXT %1
|
|
$vgpr0 = COPY %2
|
|
...
|
|
|
|
---
|
|
name: extract_s16_p3_offset1
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0
|
|
|
|
; CHECK-LABEL: name: extract_s16_p3_offset1
|
|
; CHECK: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(s16) = G_EXTRACT [[COPY]](p3), 1
|
|
; CHECK: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[EXTRACT]](s16)
|
|
; CHECK: $vgpr0 = COPY [[ANYEXT]](s32)
|
|
%0:_(p3) = COPY $vgpr0
|
|
%1:_(s16) = G_EXTRACT %0, 1
|
|
%2:_(s32) = G_ANYEXT %1
|
|
$vgpr0 = COPY %2
|
|
...
|