1390 lines
52 KiB
YAML
1390 lines
52 KiB
YAML
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
|
|
# RUN: llc -mtriple=amdgcn-mesa-mesa3d -run-pass=legalizer -global-isel-abort=0 %s -o - | FileCheck %s
|
|
|
|
---
|
|
name: test_insert_s64_s32_offset0
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1, $vgpr2
|
|
|
|
; CHECK-LABEL: name: test_insert_s64_s32_offset0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(s64) = G_INSERT [[COPY]], [[COPY1]](s32), 0
|
|
; CHECK: $vgpr0_vgpr1 = COPY [[INSERT]](s64)
|
|
%0:_(s64) = COPY $vgpr0_vgpr1
|
|
%1:_(s32) = COPY $vgpr2
|
|
%2:_(s64) = G_INSERT %0, %1, 0
|
|
$vgpr0_vgpr1 = COPY %2
|
|
...
|
|
---
|
|
name: test_insert_s64_s32_offset32
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1, $vgpr2
|
|
|
|
; CHECK-LABEL: name: test_insert_s64_s32_offset32
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(s64) = G_INSERT [[COPY]], [[COPY1]](s32), 32
|
|
; CHECK: $vgpr0_vgpr1 = COPY [[INSERT]](s64)
|
|
%0:_(s64) = COPY $vgpr0_vgpr1
|
|
%1:_(s32) = COPY $vgpr2
|
|
%2:_(s64) = G_INSERT %0, %1, 32
|
|
$vgpr0_vgpr1 = COPY %2
|
|
...
|
|
|
|
---
|
|
name: test_insert_s64_s32_offset16
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1, $vgpr2
|
|
|
|
; CHECK-LABEL: name: test_insert_s64_s32_offset16
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(s64) = G_INSERT [[COPY]], [[COPY1]](s32), 16
|
|
; CHECK: $vgpr0_vgpr1 = COPY [[INSERT]](s64)
|
|
%0:_(s64) = COPY $vgpr0_vgpr1
|
|
%1:_(s32) = COPY $vgpr2
|
|
%2:_(s64) = G_INSERT %0, %1, 16
|
|
$vgpr0_vgpr1 = COPY %2
|
|
...
|
|
|
|
---
|
|
name: test_insert_s96_s32_offset0
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2, $vgpr3
|
|
|
|
; CHECK-LABEL: name: test_insert_s96_s32_offset0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s96) = COPY $vgpr0_vgpr1_vgpr2
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr3
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(s96) = G_INSERT [[COPY]], [[COPY1]](s32), 0
|
|
; CHECK: $vgpr0_vgpr1_vgpr2 = COPY [[INSERT]](s96)
|
|
%0:_(s96) = COPY $vgpr0_vgpr1_vgpr2
|
|
%1:_(s32) = COPY $vgpr3
|
|
%2:_(s96) = G_INSERT %0, %1, 0
|
|
$vgpr0_vgpr1_vgpr2 = COPY %2
|
|
...
|
|
---
|
|
name: test_insert_s96_s32_offset32
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2, $vgpr3
|
|
|
|
; CHECK-LABEL: name: test_insert_s96_s32_offset32
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s96) = COPY $vgpr0_vgpr1_vgpr2
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr3
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(s96) = G_INSERT [[COPY]], [[COPY1]](s32), 32
|
|
; CHECK: $vgpr0_vgpr1_vgpr2 = COPY [[INSERT]](s96)
|
|
%0:_(s96) = COPY $vgpr0_vgpr1_vgpr2
|
|
%1:_(s32) = COPY $vgpr3
|
|
%2:_(s96) = G_INSERT %0, %1, 32
|
|
$vgpr0_vgpr1_vgpr2 = COPY %2
|
|
...
|
|
---
|
|
name: test_insert_s96_s32_offset64
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2, $vgpr3
|
|
|
|
; CHECK-LABEL: name: test_insert_s96_s32_offset64
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s96) = COPY $vgpr0_vgpr1_vgpr2
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr3
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(s96) = G_INSERT [[COPY]], [[COPY1]](s32), 64
|
|
; CHECK: $vgpr0_vgpr1_vgpr2 = COPY [[INSERT]](s96)
|
|
%0:_(s96) = COPY $vgpr0_vgpr1_vgpr2
|
|
%1:_(s32) = COPY $vgpr3
|
|
%2:_(s96) = G_INSERT %0, %1, 64
|
|
$vgpr0_vgpr1_vgpr2 = COPY %2
|
|
...
|
|
---
|
|
name: test_insert_s128_s32_offset0
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
|
|
|
|
; CHECK-LABEL: name: test_insert_s128_s32_offset0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr4
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(s128) = G_INSERT [[COPY]], [[COPY1]](s32), 0
|
|
; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](s128)
|
|
%0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(s32) = COPY $vgpr4
|
|
%2:_(s128) = G_INSERT %0, %1, 0
|
|
$vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
|
|
...
|
|
---
|
|
name: test_insert_s128_s32_offset32
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
|
|
|
|
; CHECK-LABEL: name: test_insert_s128_s32_offset32
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr4
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(s128) = G_INSERT [[COPY]], [[COPY1]](s32), 32
|
|
; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](s128)
|
|
%0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(s32) = COPY $vgpr4
|
|
%2:_(s128) = G_INSERT %0, %1, 32
|
|
$vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
|
|
...
|
|
---
|
|
name: test_insert_s128_s32_offset64
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
|
|
|
|
; CHECK-LABEL: name: test_insert_s128_s32_offset64
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr4
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(s128) = G_INSERT [[COPY]], [[COPY1]](s32), 64
|
|
; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](s128)
|
|
%0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(s32) = COPY $vgpr4
|
|
%2:_(s128) = G_INSERT %0, %1, 64
|
|
$vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
|
|
...
|
|
---
|
|
name: test_insert_s128_s32_offset96
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
|
|
|
|
; CHECK-LABEL: name: test_insert_s128_s32_offset96
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr4
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(s128) = G_INSERT [[COPY]], [[COPY1]](s32), 96
|
|
; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](s128)
|
|
%0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(s32) = COPY $vgpr4
|
|
%2:_(s128) = G_INSERT %0, %1, 96
|
|
$vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
|
|
...
|
|
---
|
|
name: test_insert_s128_s64_offset0
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
|
|
|
|
; CHECK-LABEL: name: test_insert_s128_s64_offset0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr4_vgpr5
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(s128) = G_INSERT [[COPY]], [[COPY1]](s64), 0
|
|
; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](s128)
|
|
%0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(s64) = COPY $vgpr4_vgpr5
|
|
%2:_(s128) = G_INSERT %0, %1, 0
|
|
$vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
|
|
...
|
|
---
|
|
name: test_insert_s128_s64_offset32
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
|
|
|
|
; CHECK-LABEL: name: test_insert_s128_s64_offset32
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr4_vgpr5
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(s128) = G_INSERT [[COPY]], [[COPY1]](s64), 32
|
|
; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](s128)
|
|
%0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(s64) = COPY $vgpr4_vgpr5
|
|
%2:_(s128) = G_INSERT %0, %1, 32
|
|
$vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
|
|
...
|
|
---
|
|
name: test_insert_s128_s64_offset64
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
|
|
|
|
; CHECK-LABEL: name: test_insert_s128_s64_offset64
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr4_vgpr5
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(s128) = G_INSERT [[COPY]], [[COPY1]](s64), 64
|
|
; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](s128)
|
|
%0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(s64) = COPY $vgpr4_vgpr5
|
|
%2:_(s128) = G_INSERT %0, %1, 64
|
|
$vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
|
|
...
|
|
---
|
|
name: test_insert_s128_s96_offset0
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5_vgpr6
|
|
|
|
; CHECK-LABEL: name: test_insert_s128_s96_offset0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s96) = COPY $vgpr4_vgpr5_vgpr6
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(s128) = G_INSERT [[COPY]], [[COPY1]](s96), 0
|
|
; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](s128)
|
|
%0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(s96) = COPY $vgpr4_vgpr5_vgpr6
|
|
%2:_(s128) = G_INSERT %0, %1, 0
|
|
$vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
|
|
...
|
|
---
|
|
name: test_insert_s128_s96_offset32
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5_vgpr6
|
|
|
|
; CHECK-LABEL: name: test_insert_s128_s96_offset32
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s96) = COPY $vgpr4_vgpr5_vgpr6
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(s128) = G_INSERT [[COPY]], [[COPY1]](s96), 32
|
|
; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](s128)
|
|
%0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(s96) = COPY $vgpr4_vgpr5_vgpr6
|
|
%2:_(s128) = G_INSERT %0, %1, 32
|
|
$vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
|
|
...
|
|
---
|
|
name: test_insert_p0_s32_offset0
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1, $vgpr2
|
|
|
|
; CHECK-LABEL: name: test_insert_p0_s32_offset0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY $vgpr0_vgpr1
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(p0) = G_INSERT [[COPY]], [[COPY1]](s32), 0
|
|
; CHECK: $vgpr0_vgpr1 = COPY [[INSERT]](p0)
|
|
%0:_(p0) = COPY $vgpr0_vgpr1
|
|
%1:_(s32) = COPY $vgpr2
|
|
%2:_(p0) = G_INSERT %0, %1, 0
|
|
$vgpr0_vgpr1 = COPY %2
|
|
...
|
|
---
|
|
name: test_insert_p0_s32_offset32
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1, $vgpr2
|
|
|
|
; CHECK-LABEL: name: test_insert_p0_s32_offset32
|
|
; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY $vgpr0_vgpr1
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(p0) = G_INSERT [[COPY]], [[COPY1]](s32), 32
|
|
; CHECK: $vgpr0_vgpr1 = COPY [[INSERT]](p0)
|
|
%0:_(p0) = COPY $vgpr0_vgpr1
|
|
%1:_(s32) = COPY $vgpr2
|
|
%2:_(p0) = G_INSERT %0, %1, 32
|
|
$vgpr0_vgpr1 = COPY %2
|
|
...
|
|
---
|
|
name: test_insert_s128_p0_offset0
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
|
|
|
|
; CHECK-LABEL: name: test_insert_s128_p0_offset0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(p0) = COPY $vgpr4_vgpr5
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(s128) = G_INSERT [[COPY]], [[COPY1]](p0), 0
|
|
; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](s128)
|
|
%0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(p0) = COPY $vgpr4_vgpr5
|
|
%2:_(s128) = G_INSERT %0, %1, 0
|
|
$vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
|
|
...
|
|
---
|
|
name: test_insert_s128_p0_offset32
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
|
|
|
|
; CHECK-LABEL: name: test_insert_s128_p0_offset32
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(p0) = COPY $vgpr4_vgpr5
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(s128) = G_INSERT [[COPY]], [[COPY1]](p0), 32
|
|
; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](s128)
|
|
%0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(p0) = COPY $vgpr4_vgpr5
|
|
%2:_(s128) = G_INSERT %0, %1, 32
|
|
$vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
|
|
...
|
|
---
|
|
name: test_insert_s128_p0_offset64
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
|
|
|
|
; CHECK-LABEL: name: test_insert_s128_p0_offset64
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(p0) = COPY $vgpr4_vgpr5
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(s128) = G_INSERT [[COPY]], [[COPY1]](p0), 64
|
|
; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](s128)
|
|
%0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(p0) = COPY $vgpr4_vgpr5
|
|
%2:_(s128) = G_INSERT %0, %1, 64
|
|
$vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
|
|
...
|
|
|
|
---
|
|
name: test_insert_s128_s16_offset0
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
|
|
|
|
; CHECK-LABEL: name: test_insert_s128_s16_offset0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr4
|
|
; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(s128) = G_INSERT [[COPY]], [[TRUNC]](s16), 0
|
|
; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](s128)
|
|
%0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(s32) = COPY $vgpr4
|
|
%2:_(s16) = G_TRUNC %1
|
|
%3:_(s128) = G_INSERT %0, %2, 0
|
|
$vgpr0_vgpr1_vgpr2_vgpr3 = COPY %3
|
|
...
|
|
|
|
---
|
|
name: test_insert_s128_s16_offset16
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
|
|
|
|
; CHECK-LABEL: name: test_insert_s128_s16_offset16
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr4
|
|
; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(s128) = G_INSERT [[COPY]], [[TRUNC]](s16), 16
|
|
; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](s128)
|
|
%0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(s32) = COPY $vgpr4
|
|
%2:_(s16) = G_TRUNC %1
|
|
%3:_(s128) = G_INSERT %0, %2, 16
|
|
$vgpr0_vgpr1_vgpr2_vgpr3 = COPY %3
|
|
...
|
|
|
|
---
|
|
name: test_insert_s128_s16_offset32
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
|
|
|
|
; CHECK-LABEL: name: test_insert_s128_s16_offset32
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr4
|
|
; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(s128) = G_INSERT [[COPY]], [[TRUNC]](s16), 32
|
|
; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](s128)
|
|
%0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(s32) = COPY $vgpr4
|
|
%2:_(s16) = G_TRUNC %1
|
|
%3:_(s128) = G_INSERT %0, %2, 32
|
|
$vgpr0_vgpr1_vgpr2_vgpr3 = COPY %3
|
|
...
|
|
|
|
---
|
|
name: test_insert_s128_s16_offset112
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
|
|
|
|
; CHECK-LABEL: name: test_insert_s128_s16_offset112
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr4
|
|
; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(s128) = G_INSERT [[COPY]], [[TRUNC]](s16), 112
|
|
; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](s128)
|
|
%0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(s32) = COPY $vgpr4
|
|
%2:_(s16) = G_TRUNC %1
|
|
%3:_(s128) = G_INSERT %0, %2, 112
|
|
$vgpr0_vgpr1_vgpr2_vgpr3 = COPY %3
|
|
...
|
|
|
|
---
|
|
name: test_insert_v2s32_s32_offset0
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1, $vgpr2
|
|
|
|
; CHECK-LABEL: name: test_insert_v2s32_s32_offset0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr0_vgpr1
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(<2 x s32>) = G_INSERT [[COPY]], [[COPY1]](s32), 0
|
|
; CHECK: $vgpr0_vgpr1 = COPY [[INSERT]](<2 x s32>)
|
|
%0:_(<2 x s32>) = COPY $vgpr0_vgpr1
|
|
%1:_(s32) = COPY $vgpr2
|
|
%2:_(<2 x s32>) = G_INSERT %0, %1, 0
|
|
$vgpr0_vgpr1 = COPY %2
|
|
...
|
|
---
|
|
name: test_insert_v2s32_s32_offset32
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1, $vgpr2
|
|
|
|
; CHECK-LABEL: name: test_insert_v2s32_s32_offset32
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr0_vgpr1
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(<2 x s32>) = G_INSERT [[COPY]], [[COPY1]](s32), 32
|
|
; CHECK: $vgpr0_vgpr1 = COPY [[INSERT]](<2 x s32>)
|
|
%0:_(<2 x s32>) = COPY $vgpr0_vgpr1
|
|
%1:_(s32) = COPY $vgpr2
|
|
%2:_(<2 x s32>) = G_INSERT %0, %1, 32
|
|
$vgpr0_vgpr1 = COPY %2
|
|
...
|
|
---
|
|
name: test_insert_v3s32_s32_offset0
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2, $vgpr3
|
|
|
|
; CHECK-LABEL: name: test_insert_v3s32_s32_offset0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr3
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(<3 x s32>) = G_INSERT [[COPY]], [[COPY1]](s32), 0
|
|
; CHECK: $vgpr0_vgpr1_vgpr2 = COPY [[INSERT]](<3 x s32>)
|
|
%0:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
|
|
%1:_(s32) = COPY $vgpr3
|
|
%2:_(<3 x s32>) = G_INSERT %0, %1, 0
|
|
$vgpr0_vgpr1_vgpr2 = COPY %2
|
|
...
|
|
---
|
|
name: test_insert_v3s32_s32_offset32
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2, $vgpr3
|
|
|
|
; CHECK-LABEL: name: test_insert_v3s32_s32_offset32
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr3
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(<3 x s32>) = G_INSERT [[COPY]], [[COPY1]](s32), 32
|
|
; CHECK: $vgpr0_vgpr1_vgpr2 = COPY [[INSERT]](<3 x s32>)
|
|
%0:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
|
|
%1:_(s32) = COPY $vgpr3
|
|
%2:_(<3 x s32>) = G_INSERT %0, %1, 32
|
|
$vgpr0_vgpr1_vgpr2 = COPY %2
|
|
...
|
|
---
|
|
name: test_insert_v3s32_s32_offset64
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2, $vgpr3
|
|
|
|
; CHECK-LABEL: name: test_insert_v3s32_s32_offset64
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr3
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(<3 x s32>) = G_INSERT [[COPY]], [[COPY1]](s32), 64
|
|
; CHECK: $vgpr0_vgpr1_vgpr2 = COPY [[INSERT]](<3 x s32>)
|
|
%0:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
|
|
%1:_(s32) = COPY $vgpr3
|
|
%2:_(<3 x s32>) = G_INSERT %0, %1, 64
|
|
$vgpr0_vgpr1_vgpr2 = COPY %2
|
|
...
|
|
---
|
|
name: test_insert_v4s32_s32_offset0
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
|
|
|
|
; CHECK-LABEL: name: test_insert_v4s32_s32_offset0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr4
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s32>) = G_INSERT [[COPY]], [[COPY1]](s32), 0
|
|
; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](<4 x s32>)
|
|
%0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(s32) = COPY $vgpr4
|
|
%2:_(<4 x s32>) = G_INSERT %0, %1, 0
|
|
$vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
|
|
...
|
|
---
|
|
name: test_insert_v4s32_s32_offset32
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
|
|
|
|
; CHECK-LABEL: name: test_insert_v4s32_s32_offset32
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr4
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s32>) = G_INSERT [[COPY]], [[COPY1]](s32), 32
|
|
; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](<4 x s32>)
|
|
%0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(s32) = COPY $vgpr4
|
|
%2:_(<4 x s32>) = G_INSERT %0, %1, 32
|
|
$vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
|
|
...
|
|
---
|
|
name: test_insert_v4s32_s32_offset64
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
|
|
|
|
; CHECK-LABEL: name: test_insert_v4s32_s32_offset64
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr4
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s32>) = G_INSERT [[COPY]], [[COPY1]](s32), 64
|
|
; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](<4 x s32>)
|
|
%0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(s32) = COPY $vgpr4
|
|
%2:_(<4 x s32>) = G_INSERT %0, %1, 64
|
|
$vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
|
|
...
|
|
---
|
|
name: test_insert_v4s32_s32_offset96
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
|
|
|
|
; CHECK-LABEL: name: test_insert_v4s32_s32_offset96
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr4
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s32>) = G_INSERT [[COPY]], [[COPY1]](s32), 96
|
|
; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](<4 x s32>)
|
|
%0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(s32) = COPY $vgpr4
|
|
%2:_(<4 x s32>) = G_INSERT %0, %1, 96
|
|
$vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
|
|
...
|
|
---
|
|
name: test_insert_v4s32_s64_offset0
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
|
|
|
|
; CHECK-LABEL: name: test_insert_v4s32_s64_offset0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr4_vgpr5
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s32>) = G_INSERT [[COPY]], [[COPY1]](s64), 0
|
|
; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](<4 x s32>)
|
|
%0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(s64) = COPY $vgpr4_vgpr5
|
|
%2:_(<4 x s32>) = G_INSERT %0, %1, 0
|
|
$vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
|
|
...
|
|
---
|
|
name: test_insert_v4s32_s64_offset32
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
|
|
|
|
; CHECK-LABEL: name: test_insert_v4s32_s64_offset32
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr4_vgpr5
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s32>) = G_INSERT [[COPY]], [[COPY1]](s64), 32
|
|
; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](<4 x s32>)
|
|
%0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(s64) = COPY $vgpr4_vgpr5
|
|
%2:_(<4 x s32>) = G_INSERT %0, %1, 32
|
|
$vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
|
|
...
|
|
---
|
|
name: test_insert_v4s32_s64_offset64
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
|
|
|
|
; CHECK-LABEL: name: test_insert_v4s32_s64_offset64
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr4_vgpr5
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s32>) = G_INSERT [[COPY]], [[COPY1]](s64), 64
|
|
; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](<4 x s32>)
|
|
%0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(s64) = COPY $vgpr4_vgpr5
|
|
%2:_(<4 x s32>) = G_INSERT %0, %1, 64
|
|
$vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
|
|
...
|
|
---
|
|
name: test_insert_v4s32_s96_offset0
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5_vgpr6
|
|
|
|
; CHECK-LABEL: name: test_insert_v4s32_s96_offset0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s96) = COPY $vgpr4_vgpr5_vgpr6
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s32>) = G_INSERT [[COPY]], [[COPY1]](s96), 0
|
|
; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](<4 x s32>)
|
|
%0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(s96) = COPY $vgpr4_vgpr5_vgpr6
|
|
%2:_(<4 x s32>) = G_INSERT %0, %1, 0
|
|
$vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
|
|
...
|
|
---
|
|
name: test_insert_v4s32_s96_offset32
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5_vgpr6
|
|
|
|
; CHECK-LABEL: name: test_insert_v4s32_s96_offset32
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s96) = COPY $vgpr4_vgpr5_vgpr6
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s32>) = G_INSERT [[COPY]], [[COPY1]](s96), 32
|
|
; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](<4 x s32>)
|
|
%0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(s96) = COPY $vgpr4_vgpr5_vgpr6
|
|
%2:_(<4 x s32>) = G_INSERT %0, %1, 32
|
|
$vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
|
|
...
|
|
---
|
|
name: test_insert_v4s32_v2s32_offset0
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
|
|
|
|
; CHECK-LABEL: name: test_insert_v4s32_v2s32_offset0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr4_vgpr5
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s32>) = G_INSERT [[COPY]], [[COPY1]](<2 x s32>), 0
|
|
; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](<4 x s32>)
|
|
%0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(<2 x s32>) = COPY $vgpr4_vgpr5
|
|
%2:_(<4 x s32>) = G_INSERT %0, %1, 0
|
|
$vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
|
|
...
|
|
---
|
|
name: test_insert_v4s32_v2s32_offset32
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
|
|
|
|
; CHECK-LABEL: name: test_insert_v4s32_v2s32_offset32
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr4_vgpr5
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s32>) = G_INSERT [[COPY]], [[COPY1]](<2 x s32>), 32
|
|
; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](<4 x s32>)
|
|
%0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(<2 x s32>) = COPY $vgpr4_vgpr5
|
|
%2:_(<4 x s32>) = G_INSERT %0, %1, 32
|
|
$vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
|
|
...
|
|
---
|
|
name: test_insert_v4s32_v2s32_offset64
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
|
|
|
|
; CHECK-LABEL: name: test_insert_v4s32_v2s32_offset64
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr4_vgpr5
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s32>) = G_INSERT [[COPY]], [[COPY1]](<2 x s32>), 64
|
|
; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](<4 x s32>)
|
|
%0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(<2 x s32>) = COPY $vgpr4_vgpr5
|
|
%2:_(<4 x s32>) = G_INSERT %0, %1, 64
|
|
$vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
|
|
...
|
|
---
|
|
name: test_insert_v4s32_v3s32_offset0
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5_vgpr6
|
|
|
|
; CHECK-LABEL: name: test_insert_v4s32_v3s32_offset0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr4_vgpr5_vgpr6
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s32>) = G_INSERT [[COPY]], [[COPY1]](<3 x s32>), 0
|
|
; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](<4 x s32>)
|
|
%0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(<3 x s32>) = COPY $vgpr4_vgpr5_vgpr6
|
|
%2:_(<4 x s32>) = G_INSERT %0, %1, 0
|
|
$vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
|
|
...
|
|
---
|
|
name: test_insert_v4s32_v3s32_offset32
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5_vgpr6
|
|
|
|
; CHECK-LABEL: name: test_insert_v4s32_v3s32_offset32
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr4_vgpr5_vgpr6
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s32>) = G_INSERT [[COPY]], [[COPY1]](<3 x s32>), 32
|
|
; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](<4 x s32>)
|
|
%0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(<3 x s32>) = COPY $vgpr4_vgpr5_vgpr6
|
|
%2:_(<4 x s32>) = G_INSERT %0, %1, 32
|
|
$vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
|
|
...
|
|
---
|
|
name: test_insert_v4s32_p0_offset0
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
|
|
|
|
; CHECK-LABEL: name: test_insert_v4s32_p0_offset0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(p0) = COPY $vgpr4_vgpr5
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s32>) = G_INSERT [[COPY]], [[COPY1]](p0), 0
|
|
; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](<4 x s32>)
|
|
%0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(p0) = COPY $vgpr4_vgpr5
|
|
%2:_(<4 x s32>) = G_INSERT %0, %1, 0
|
|
$vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
|
|
...
|
|
---
|
|
name: test_insert_v4s32_p0_offset32
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
|
|
|
|
; CHECK-LABEL: name: test_insert_v4s32_p0_offset32
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(p0) = COPY $vgpr4_vgpr5
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s32>) = G_INSERT [[COPY]], [[COPY1]](p0), 32
|
|
; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](<4 x s32>)
|
|
%0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(p0) = COPY $vgpr4_vgpr5
|
|
%2:_(<4 x s32>) = G_INSERT %0, %1, 32
|
|
$vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
|
|
...
|
|
---
|
|
name: test_insert_v4s32_p0_offset64
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
|
|
|
|
; CHECK-LABEL: name: test_insert_v4s32_p0_offset64
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(p0) = COPY $vgpr4_vgpr5
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s32>) = G_INSERT [[COPY]], [[COPY1]](p0), 64
|
|
; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](<4 x s32>)
|
|
%0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(p0) = COPY $vgpr4_vgpr5
|
|
%2:_(<4 x s32>) = G_INSERT %0, %1, 64
|
|
$vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
|
|
...
|
|
|
|
---
|
|
name: test_insert_v2s16_s16_offset0
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0, $vgpr1
|
|
|
|
; CHECK-LABEL: name: test_insert_v2s16_s16_offset0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr0
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
|
|
; CHECK: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[COPY]](<2 x s16>)
|
|
; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
|
|
; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
|
|
; CHECK: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C]]
|
|
; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 -65536
|
|
; CHECK: [[AND1:%[0-9]+]]:_(s32) = G_AND [[BITCAST]], [[C1]]
|
|
; CHECK: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND1]], [[AND]]
|
|
; CHECK: [[BITCAST1:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR]](s32)
|
|
; CHECK: $vgpr0 = COPY [[BITCAST1]](<2 x s16>)
|
|
%0:_(<2 x s16>) = COPY $vgpr0
|
|
%1:_(s32) = COPY $vgpr1
|
|
%2:_(s16) = G_TRUNC %1
|
|
%3:_(<2 x s16>) = G_INSERT %0, %2, 0
|
|
$vgpr0 = COPY %3
|
|
...
|
|
|
|
---
|
|
name: test_insert_v2s16_s16_offset1
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0, $vgpr1
|
|
|
|
; CHECK-LABEL: name: test_insert_v2s16_s16_offset1
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr0
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
|
|
; CHECK: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[COPY]](<2 x s16>)
|
|
; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
|
|
; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
|
|
; CHECK: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C]]
|
|
; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
|
|
; CHECK: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND]], [[C1]](s32)
|
|
; CHECK: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 -131071
|
|
; CHECK: [[AND1:%[0-9]+]]:_(s32) = G_AND [[BITCAST]], [[C2]]
|
|
; CHECK: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND1]], [[SHL]]
|
|
; CHECK: [[BITCAST1:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR]](s32)
|
|
; CHECK: $vgpr0 = COPY [[BITCAST1]](<2 x s16>)
|
|
%0:_(<2 x s16>) = COPY $vgpr0
|
|
%1:_(s32) = COPY $vgpr1
|
|
%2:_(s16) = G_TRUNC %1
|
|
%3:_(<2 x s16>) = G_INSERT %0, %2, 1
|
|
$vgpr0 = COPY %3
|
|
...
|
|
---
|
|
name: test_insert_v2s16_s16_offset16
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0, $vgpr1
|
|
|
|
; CHECK-LABEL: name: test_insert_v2s16_s16_offset16
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr0
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
|
|
; CHECK: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[COPY]](<2 x s16>)
|
|
; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
|
|
; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
|
|
; CHECK: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C]]
|
|
; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
|
|
; CHECK: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND]], [[C1]](s32)
|
|
; CHECK: [[AND1:%[0-9]+]]:_(s32) = G_AND [[BITCAST]], [[C]]
|
|
; CHECK: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND1]], [[SHL]]
|
|
; CHECK: [[BITCAST1:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR]](s32)
|
|
; CHECK: $vgpr0 = COPY [[BITCAST1]](<2 x s16>)
|
|
%0:_(<2 x s16>) = COPY $vgpr0
|
|
%1:_(s32) = COPY $vgpr1
|
|
%2:_(s16) = G_TRUNC %1
|
|
%3:_(<2 x s16>) = G_INSERT %0, %2, 16
|
|
$vgpr0 = COPY %3
|
|
...
|
|
---
|
|
name: test_insert_v3s16_s16_offset0
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1, $vgpr2
|
|
|
|
; CHECK-LABEL: name: test_insert_v3s16_s16_offset0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(<3 x s16>) = G_EXTRACT [[COPY]](<4 x s16>), 0
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
|
|
; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
|
|
; CHECK: [[DEF:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF]], [[EXTRACT]](<3 x s16>), 0
|
|
; CHECK: [[INSERT1:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[INSERT]], [[TRUNC]](s16), 0
|
|
; CHECK: [[CONCAT_VECTORS:%[0-9]+]]:_(<12 x s16>) = G_CONCAT_VECTORS [[INSERT1]](<4 x s16>), [[DEF]](<4 x s16>), [[DEF]](<4 x s16>)
|
|
; CHECK: [[UV:%[0-9]+]]:_(<3 x s16>), [[UV1:%[0-9]+]]:_(<3 x s16>), [[UV2:%[0-9]+]]:_(<3 x s16>), [[UV3:%[0-9]+]]:_(<3 x s16>) = G_UNMERGE_VALUES [[CONCAT_VECTORS]](<12 x s16>)
|
|
; CHECK: [[INSERT2:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF]], [[UV]](<3 x s16>), 0
|
|
; CHECK: $vgpr0_vgpr1 = COPY [[INSERT2]](<4 x s16>)
|
|
%0:_(<4 x s16>) = COPY $vgpr0_vgpr1
|
|
%1:_(<3 x s16>) = G_EXTRACT %0, 0
|
|
%2:_(s32) = COPY $vgpr2
|
|
%3:_(s16) = G_TRUNC %2
|
|
%4:_(<3 x s16>) = G_INSERT %1, %3, 0
|
|
%5:_(<4 x s16>) = G_IMPLICIT_DEF
|
|
%6:_(<4 x s16>) = G_INSERT %5, %4, 0
|
|
$vgpr0_vgpr1 = COPY %6
|
|
...
|
|
---
|
|
name: test_insert_v3s16_s16_offset16
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1, $vgpr2
|
|
|
|
; CHECK-LABEL: name: test_insert_v3s16_s16_offset16
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(<3 x s16>) = G_EXTRACT [[COPY]](<4 x s16>), 0
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
|
|
; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
|
|
; CHECK: [[DEF:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF]], [[EXTRACT]](<3 x s16>), 0
|
|
; CHECK: [[INSERT1:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[INSERT]], [[TRUNC]](s16), 16
|
|
; CHECK: [[CONCAT_VECTORS:%[0-9]+]]:_(<12 x s16>) = G_CONCAT_VECTORS [[INSERT1]](<4 x s16>), [[DEF]](<4 x s16>), [[DEF]](<4 x s16>)
|
|
; CHECK: [[UV:%[0-9]+]]:_(<3 x s16>), [[UV1:%[0-9]+]]:_(<3 x s16>), [[UV2:%[0-9]+]]:_(<3 x s16>), [[UV3:%[0-9]+]]:_(<3 x s16>) = G_UNMERGE_VALUES [[CONCAT_VECTORS]](<12 x s16>)
|
|
; CHECK: [[INSERT2:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF]], [[UV]](<3 x s16>), 0
|
|
; CHECK: $vgpr0_vgpr1 = COPY [[INSERT2]](<4 x s16>)
|
|
%0:_(<4 x s16>) = COPY $vgpr0_vgpr1
|
|
%1:_(<3 x s16>) = G_EXTRACT %0, 0
|
|
%2:_(s32) = COPY $vgpr2
|
|
%3:_(s16) = G_TRUNC %2
|
|
%4:_(<3 x s16>) = G_INSERT %1, %3, 16
|
|
%5:_(<4 x s16>) = G_IMPLICIT_DEF
|
|
%6:_(<4 x s16>) = G_INSERT %5, %4, 0
|
|
$vgpr0_vgpr1 = COPY %6
|
|
...
|
|
---
|
|
name: test_insert_v3s16_s16_offset32
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1, $vgpr2
|
|
|
|
; CHECK-LABEL: name: test_insert_v3s16_s16_offset32
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(<3 x s16>) = G_EXTRACT [[COPY]](<4 x s16>), 0
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
|
|
; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
|
|
; CHECK: [[DEF:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF]], [[EXTRACT]](<3 x s16>), 0
|
|
; CHECK: [[INSERT1:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[INSERT]], [[TRUNC]](s16), 32
|
|
; CHECK: [[CONCAT_VECTORS:%[0-9]+]]:_(<12 x s16>) = G_CONCAT_VECTORS [[INSERT1]](<4 x s16>), [[DEF]](<4 x s16>), [[DEF]](<4 x s16>)
|
|
; CHECK: [[UV:%[0-9]+]]:_(<3 x s16>), [[UV1:%[0-9]+]]:_(<3 x s16>), [[UV2:%[0-9]+]]:_(<3 x s16>), [[UV3:%[0-9]+]]:_(<3 x s16>) = G_UNMERGE_VALUES [[CONCAT_VECTORS]](<12 x s16>)
|
|
; CHECK: [[INSERT2:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF]], [[UV]](<3 x s16>), 0
|
|
; CHECK: $vgpr0_vgpr1 = COPY [[INSERT2]](<4 x s16>)
|
|
%0:_(<4 x s16>) = COPY $vgpr0_vgpr1
|
|
%1:_(<3 x s16>) = G_EXTRACT %0, 0
|
|
%2:_(s32) = COPY $vgpr2
|
|
%3:_(s16) = G_TRUNC %2
|
|
%4:_(<3 x s16>) = G_INSERT %1, %3, 32
|
|
%5:_(<4 x s16>) = G_IMPLICIT_DEF
|
|
%6:_(<4 x s16>) = G_INSERT %5, %4, 0
|
|
$vgpr0_vgpr1 = COPY %6
|
|
...
|
|
---
|
|
name: test_insert_v3s16_v2s16_offset0
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1, $vgpr2
|
|
|
|
; CHECK-LABEL: name: test_insert_v3s16_v2s16_offset0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(<3 x s16>) = G_EXTRACT [[COPY]](<4 x s16>), 0
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr2
|
|
; CHECK: [[DEF:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF]], [[EXTRACT]](<3 x s16>), 0
|
|
; CHECK: [[INSERT1:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[INSERT]], [[COPY1]](<2 x s16>), 0
|
|
; CHECK: [[CONCAT_VECTORS:%[0-9]+]]:_(<12 x s16>) = G_CONCAT_VECTORS [[INSERT1]](<4 x s16>), [[DEF]](<4 x s16>), [[DEF]](<4 x s16>)
|
|
; CHECK: [[UV:%[0-9]+]]:_(<3 x s16>), [[UV1:%[0-9]+]]:_(<3 x s16>), [[UV2:%[0-9]+]]:_(<3 x s16>), [[UV3:%[0-9]+]]:_(<3 x s16>) = G_UNMERGE_VALUES [[CONCAT_VECTORS]](<12 x s16>)
|
|
; CHECK: [[INSERT2:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF]], [[UV]](<3 x s16>), 0
|
|
; CHECK: $vgpr0_vgpr1 = COPY [[INSERT2]](<4 x s16>)
|
|
%0:_(<4 x s16>) = COPY $vgpr0_vgpr1
|
|
%1:_(<3 x s16>) = G_EXTRACT %0, 0
|
|
%2:_(<2 x s16>) = COPY $vgpr2
|
|
%4:_(<3 x s16>) = G_INSERT %1, %2, 0
|
|
%5:_(<4 x s16>) = G_IMPLICIT_DEF
|
|
%6:_(<4 x s16>) = G_INSERT %5, %4, 0
|
|
$vgpr0_vgpr1 = COPY %6
|
|
...
|
|
---
|
|
name: test_insert_v3s16_v2s16_offset16
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1, $vgpr2
|
|
|
|
; CHECK-LABEL: name: test_insert_v3s16_v2s16_offset16
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(<3 x s16>) = G_EXTRACT [[COPY]](<4 x s16>), 0
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr2
|
|
; CHECK: [[DEF:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF]], [[EXTRACT]](<3 x s16>), 0
|
|
; CHECK: [[INSERT1:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[INSERT]], [[COPY1]](<2 x s16>), 16
|
|
; CHECK: [[CONCAT_VECTORS:%[0-9]+]]:_(<12 x s16>) = G_CONCAT_VECTORS [[INSERT1]](<4 x s16>), [[DEF]](<4 x s16>), [[DEF]](<4 x s16>)
|
|
; CHECK: [[UV:%[0-9]+]]:_(<3 x s16>), [[UV1:%[0-9]+]]:_(<3 x s16>), [[UV2:%[0-9]+]]:_(<3 x s16>), [[UV3:%[0-9]+]]:_(<3 x s16>) = G_UNMERGE_VALUES [[CONCAT_VECTORS]](<12 x s16>)
|
|
; CHECK: [[INSERT2:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF]], [[UV]](<3 x s16>), 0
|
|
; CHECK: $vgpr0_vgpr1 = COPY [[INSERT2]](<4 x s16>)
|
|
%0:_(<4 x s16>) = COPY $vgpr0_vgpr1
|
|
%1:_(<3 x s16>) = G_EXTRACT %0, 0
|
|
%2:_(<2 x s16>) = COPY $vgpr2
|
|
%4:_(<3 x s16>) = G_INSERT %1, %2, 16
|
|
%5:_(<4 x s16>) = G_IMPLICIT_DEF
|
|
%6:_(<4 x s16>) = G_INSERT %5, %4, 0
|
|
$vgpr0_vgpr1 = COPY %6
|
|
...
|
|
---
|
|
name: test_insert_v3s16_s32_offset0
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1, $vgpr2
|
|
|
|
; CHECK-LABEL: name: test_insert_v3s16_s32_offset0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(<3 x s16>) = G_EXTRACT [[COPY]](<4 x s16>), 0
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
|
|
; CHECK: [[DEF:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF]], [[EXTRACT]](<3 x s16>), 0
|
|
; CHECK: [[INSERT1:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[INSERT]], [[COPY1]](s32), 0
|
|
; CHECK: [[CONCAT_VECTORS:%[0-9]+]]:_(<12 x s16>) = G_CONCAT_VECTORS [[INSERT1]](<4 x s16>), [[DEF]](<4 x s16>), [[DEF]](<4 x s16>)
|
|
; CHECK: [[UV:%[0-9]+]]:_(<3 x s16>), [[UV1:%[0-9]+]]:_(<3 x s16>), [[UV2:%[0-9]+]]:_(<3 x s16>), [[UV3:%[0-9]+]]:_(<3 x s16>) = G_UNMERGE_VALUES [[CONCAT_VECTORS]](<12 x s16>)
|
|
; CHECK: [[INSERT2:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF]], [[UV]](<3 x s16>), 0
|
|
; CHECK: $vgpr0_vgpr1 = COPY [[INSERT2]](<4 x s16>)
|
|
%0:_(<4 x s16>) = COPY $vgpr0_vgpr1
|
|
%1:_(<3 x s16>) = G_EXTRACT %0, 0
|
|
%2:_(s32) = COPY $vgpr2
|
|
%4:_(<3 x s16>) = G_INSERT %1, %2, 0
|
|
%5:_(<4 x s16>) = G_IMPLICIT_DEF
|
|
%6:_(<4 x s16>) = G_INSERT %5, %4, 0
|
|
$vgpr0_vgpr1 = COPY %6
|
|
...
|
|
---
|
|
name: test_insert_v3s16_s32_offset16
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1, $vgpr2
|
|
|
|
; CHECK-LABEL: name: test_insert_v3s16_s32_offset16
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(<3 x s16>) = G_EXTRACT [[COPY]](<4 x s16>), 0
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
|
|
; CHECK: [[DEF:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF]], [[EXTRACT]](<3 x s16>), 0
|
|
; CHECK: [[INSERT1:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[INSERT]], [[COPY1]](s32), 16
|
|
; CHECK: [[CONCAT_VECTORS:%[0-9]+]]:_(<12 x s16>) = G_CONCAT_VECTORS [[INSERT1]](<4 x s16>), [[DEF]](<4 x s16>), [[DEF]](<4 x s16>)
|
|
; CHECK: [[UV:%[0-9]+]]:_(<3 x s16>), [[UV1:%[0-9]+]]:_(<3 x s16>), [[UV2:%[0-9]+]]:_(<3 x s16>), [[UV3:%[0-9]+]]:_(<3 x s16>) = G_UNMERGE_VALUES [[CONCAT_VECTORS]](<12 x s16>)
|
|
; CHECK: [[INSERT2:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF]], [[UV]](<3 x s16>), 0
|
|
; CHECK: $vgpr0_vgpr1 = COPY [[INSERT2]](<4 x s16>)
|
|
%0:_(<4 x s16>) = COPY $vgpr0_vgpr1
|
|
%1:_(<3 x s16>) = G_EXTRACT %0, 0
|
|
%2:_(s32) = COPY $vgpr2
|
|
%4:_(<3 x s16>) = G_INSERT %1, %2, 16
|
|
%5:_(<4 x s16>) = G_IMPLICIT_DEF
|
|
%6:_(<4 x s16>) = G_INSERT %5, %4, 0
|
|
$vgpr0_vgpr1 = COPY %6
|
|
...
|
|
---
|
|
name: test_insert_v4s16_s16_offset0
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1, $vgpr2
|
|
|
|
; CHECK-LABEL: name: test_insert_v4s16_s16_offset0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
|
|
; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[COPY]], [[TRUNC]](s16), 0
|
|
; CHECK: $vgpr0_vgpr1 = COPY [[INSERT]](<4 x s16>)
|
|
%0:_(<4 x s16>) = COPY $vgpr0_vgpr1
|
|
%1:_(s32) = COPY $vgpr2
|
|
%2:_(s16) = G_TRUNC %1
|
|
%3:_(<4 x s16>) = G_INSERT %0, %2, 0
|
|
$vgpr0_vgpr1 = COPY %3
|
|
...
|
|
---
|
|
name: test_insert_v4s16_s16_offset16
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1, $vgpr2
|
|
|
|
; CHECK-LABEL: name: test_insert_v4s16_s16_offset16
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
|
|
; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[COPY]], [[TRUNC]](s16), 16
|
|
; CHECK: $vgpr0_vgpr1 = COPY [[INSERT]](<4 x s16>)
|
|
%0:_(<4 x s16>) = COPY $vgpr0_vgpr1
|
|
%1:_(s32) = COPY $vgpr2
|
|
%2:_(s16) = G_TRUNC %1
|
|
%3:_(<4 x s16>) = G_INSERT %0, %2, 16
|
|
$vgpr0_vgpr1 = COPY %3
|
|
...
|
|
---
|
|
name: test_insert_v4s16_s16_offset32
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1, $vgpr2
|
|
|
|
; CHECK-LABEL: name: test_insert_v4s16_s16_offset32
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
|
|
; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[COPY]], [[TRUNC]](s16), 32
|
|
; CHECK: $vgpr0_vgpr1 = COPY [[INSERT]](<4 x s16>)
|
|
%0:_(<4 x s16>) = COPY $vgpr0_vgpr1
|
|
%1:_(s32) = COPY $vgpr2
|
|
%2:_(s16) = G_TRUNC %1
|
|
%3:_(<4 x s16>) = G_INSERT %0, %2, 32
|
|
$vgpr0_vgpr1 = COPY %3
|
|
...
|
|
---
|
|
name: test_insert_v4s16_s16_offset48
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1, $vgpr2
|
|
|
|
; CHECK-LABEL: name: test_insert_v4s16_s16_offset48
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
|
|
; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[COPY]], [[TRUNC]](s16), 48
|
|
; CHECK: $vgpr0_vgpr1 = COPY [[INSERT]](<4 x s16>)
|
|
%0:_(<4 x s16>) = COPY $vgpr0_vgpr1
|
|
%1:_(s32) = COPY $vgpr2
|
|
%2:_(s16) = G_TRUNC %1
|
|
%3:_(<4 x s16>) = G_INSERT %0, %2, 48
|
|
$vgpr0_vgpr1 = COPY %3
|
|
...
|
|
---
|
|
name: test_insert_v4s16_v2s16_offset0
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1, $vgpr2
|
|
|
|
; CHECK-LABEL: name: test_insert_v4s16_v2s16_offset0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr2
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[COPY]], [[COPY1]](<2 x s16>), 0
|
|
; CHECK: $vgpr0_vgpr1 = COPY [[INSERT]](<4 x s16>)
|
|
%0:_(<4 x s16>) = COPY $vgpr0_vgpr1
|
|
%1:_(<2 x s16>) = COPY $vgpr2
|
|
%2:_(<4 x s16>) = G_INSERT %0, %1, 0
|
|
$vgpr0_vgpr1 = COPY %2
|
|
...
|
|
---
|
|
name: test_insert_v4s16_v2s16_offset16
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1, $vgpr2
|
|
|
|
; CHECK-LABEL: name: test_insert_v4s16_v2s16_offset16
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr2
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[COPY]], [[COPY1]](<2 x s16>), 16
|
|
; CHECK: $vgpr0_vgpr1 = COPY [[INSERT]](<4 x s16>)
|
|
%0:_(<4 x s16>) = COPY $vgpr0_vgpr1
|
|
%1:_(<2 x s16>) = COPY $vgpr2
|
|
%2:_(<4 x s16>) = G_INSERT %0, %1, 16
|
|
$vgpr0_vgpr1 = COPY %2
|
|
...
|
|
---
|
|
name: test_insert_v4s16_v2s16_offset32
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1, $vgpr2
|
|
|
|
; CHECK-LABEL: name: test_insert_v4s16_v2s16_offset32
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr2
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[COPY]], [[COPY1]](<2 x s16>), 32
|
|
; CHECK: $vgpr0_vgpr1 = COPY [[INSERT]](<4 x s16>)
|
|
%0:_(<4 x s16>) = COPY $vgpr0_vgpr1
|
|
%1:_(<2 x s16>) = COPY $vgpr2
|
|
%2:_(<4 x s16>) = G_INSERT %0, %1, 32
|
|
$vgpr0_vgpr1 = COPY %2
|
|
...
|
|
---
|
|
name: test_insert_v4s16_v3s16_offset0
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
|
|
|
|
; CHECK-LABEL: name: test_insert_v4s16_v3s16_offset0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr2_vgpr3
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(<3 x s16>) = G_EXTRACT [[COPY1]](<4 x s16>), 0
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[COPY]], [[EXTRACT]](<3 x s16>), 0
|
|
; CHECK: $vgpr0_vgpr1 = COPY [[INSERT]](<4 x s16>)
|
|
%0:_(<4 x s16>) = COPY $vgpr0_vgpr1
|
|
%1:_(<4 x s16>) = COPY $vgpr2_vgpr3
|
|
%2:_(<3 x s16>) = G_EXTRACT %1, 0
|
|
%3:_(<4 x s16>) = G_INSERT %0, %2, 0
|
|
$vgpr0_vgpr1 = COPY %3
|
|
...
|
|
---
|
|
name: test_insert_v4s16_v3s16_offset16
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
|
|
|
|
; CHECK-LABEL: name: test_insert_v4s16_v3s16_offset16
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr2_vgpr3
|
|
; CHECK: [[EXTRACT:%[0-9]+]]:_(<3 x s16>) = G_EXTRACT [[COPY1]](<4 x s16>), 0
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[COPY]], [[EXTRACT]](<3 x s16>), 16
|
|
; CHECK: $vgpr0_vgpr1 = COPY [[INSERT]](<4 x s16>)
|
|
%0:_(<4 x s16>) = COPY $vgpr0_vgpr1
|
|
%1:_(<4 x s16>) = COPY $vgpr2_vgpr3
|
|
%2:_(<3 x s16>) = G_EXTRACT %1, 0
|
|
%3:_(<4 x s16>) = G_INSERT %0, %2, 16
|
|
$vgpr0_vgpr1 = COPY %3
|
|
...
|
|
---
|
|
name: test_insert_v4s16_s32_offset0
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1, $vgpr2
|
|
|
|
; CHECK-LABEL: name: test_insert_v4s16_s32_offset0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[COPY]], [[COPY1]](s32), 0
|
|
; CHECK: $vgpr0_vgpr1 = COPY [[INSERT]](<4 x s16>)
|
|
%0:_(<4 x s16>) = COPY $vgpr0_vgpr1
|
|
%1:_(s32) = COPY $vgpr2
|
|
%2:_(<4 x s16>) = G_INSERT %0, %1, 0
|
|
$vgpr0_vgpr1 = COPY %2
|
|
...
|
|
---
|
|
name: test_insert_v4s16_s32_offset16
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1, $vgpr2
|
|
|
|
; CHECK-LABEL: name: test_insert_v4s16_s32_offset16
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[COPY]], [[COPY1]](s32), 16
|
|
; CHECK: $vgpr0_vgpr1 = COPY [[INSERT]](<4 x s16>)
|
|
%0:_(<4 x s16>) = COPY $vgpr0_vgpr1
|
|
%1:_(s32) = COPY $vgpr2
|
|
%2:_(<4 x s16>) = G_INSERT %0, %1, 16
|
|
$vgpr0_vgpr1 = COPY %2
|
|
...
|
|
---
|
|
name: test_insert_v4s16_s32_offset32
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1, $vgpr2
|
|
|
|
; CHECK-LABEL: name: test_insert_v4s16_s32_offset32
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[COPY]], [[COPY1]](s32), 32
|
|
; CHECK: $vgpr0_vgpr1 = COPY [[INSERT]](<4 x s16>)
|
|
%0:_(<4 x s16>) = COPY $vgpr0_vgpr1
|
|
%1:_(s32) = COPY $vgpr2
|
|
%2:_(<4 x s16>) = G_INSERT %0, %1, 32
|
|
$vgpr0_vgpr1 = COPY %2
|
|
...
|
|
|
|
---
|
|
name: test_insert_s64_s16_offset0
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1, $vgpr2
|
|
|
|
; CHECK-LABEL: name: test_insert_s64_s16_offset0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
|
|
; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(s64) = G_INSERT [[COPY]], [[TRUNC]](s16), 0
|
|
; CHECK: $vgpr0_vgpr1 = COPY [[INSERT]](s64)
|
|
%0:_(s64) = COPY $vgpr0_vgpr1
|
|
%1:_(s32) = COPY $vgpr2
|
|
%2:_(s16) = G_TRUNC %1
|
|
%3:_(s64) = G_INSERT %0, %2, 0
|
|
$vgpr0_vgpr1 = COPY %3
|
|
...
|
|
---
|
|
name: test_insert_s64_s16_offset16
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1, $vgpr2
|
|
|
|
; CHECK-LABEL: name: test_insert_s64_s16_offset16
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
|
|
; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(s64) = G_INSERT [[COPY]], [[TRUNC]](s16), 16
|
|
; CHECK: $vgpr0_vgpr1 = COPY [[INSERT]](s64)
|
|
%0:_(s64) = COPY $vgpr0_vgpr1
|
|
%1:_(s32) = COPY $vgpr2
|
|
%2:_(s16) = G_TRUNC %1
|
|
%3:_(s64) = G_INSERT %0, %2, 16
|
|
$vgpr0_vgpr1 = COPY %3
|
|
...
|
|
---
|
|
name: test_insert_s64_s16_offset32
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1, $vgpr2
|
|
|
|
; CHECK-LABEL: name: test_insert_s64_s16_offset32
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
|
|
; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(s64) = G_INSERT [[COPY]], [[TRUNC]](s16), 32
|
|
; CHECK: $vgpr0_vgpr1 = COPY [[INSERT]](s64)
|
|
%0:_(s64) = COPY $vgpr0_vgpr1
|
|
%1:_(s32) = COPY $vgpr2
|
|
%2:_(s16) = G_TRUNC %1
|
|
%3:_(s64) = G_INSERT %0, %2, 32
|
|
$vgpr0_vgpr1 = COPY %3
|
|
...
|
|
---
|
|
name: test_insert_s64_s16_offset48
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1, $vgpr2
|
|
|
|
; CHECK-LABEL: name: test_insert_s64_s16_offset48
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
|
|
; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
|
|
; CHECK: [[INSERT:%[0-9]+]]:_(s64) = G_INSERT [[COPY]], [[TRUNC]](s16), 48
|
|
; CHECK: $vgpr0_vgpr1 = COPY [[INSERT]](s64)
|
|
%0:_(s64) = COPY $vgpr0_vgpr1
|
|
%1:_(s32) = COPY $vgpr2
|
|
%2:_(s16) = G_TRUNC %1
|
|
%3:_(s64) = G_INSERT %0, %2, 48
|
|
$vgpr0_vgpr1 = COPY %3
|
|
...
|
|
---
|
|
name: test_insert_s32_s16_offset0
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0, $vgpr1
|
|
|
|
; CHECK-LABEL: name: test_insert_s32_s16_offset0
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
|
|
; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
|
|
; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
|
|
; CHECK: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C]]
|
|
; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 -65536
|
|
; CHECK: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C1]]
|
|
; CHECK: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND1]], [[AND]]
|
|
; CHECK: [[COPY3:%[0-9]+]]:_(s32) = COPY [[OR]](s32)
|
|
; CHECK: $vgpr0 = COPY [[COPY3]](s32)
|
|
%0:_(s32) = COPY $vgpr0
|
|
%1:_(s32) = COPY $vgpr1
|
|
%2:_(s16) = G_TRUNC %1
|
|
%3:_(s32) = G_INSERT %1, %2, 0
|
|
$vgpr0 = COPY %3
|
|
...
|
|
|
|
---
|
|
name: test_insert_s32_s16_offset1
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0, $vgpr1
|
|
|
|
; CHECK-LABEL: name: test_insert_s32_s16_offset1
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
|
|
; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
|
|
; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
|
|
; CHECK: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C]]
|
|
; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
|
|
; CHECK: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND]], [[C1]](s32)
|
|
; CHECK: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 -131071
|
|
; CHECK: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C2]]
|
|
; CHECK: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND1]], [[SHL]]
|
|
; CHECK: [[COPY3:%[0-9]+]]:_(s32) = COPY [[OR]](s32)
|
|
; CHECK: $vgpr0 = COPY [[COPY3]](s32)
|
|
%0:_(s32) = COPY $vgpr0
|
|
%1:_(s32) = COPY $vgpr1
|
|
%2:_(s16) = G_TRUNC %1
|
|
%3:_(s32) = G_INSERT %1, %2, 1
|
|
$vgpr0 = COPY %3
|
|
...
|
|
|
|
---
|
|
name: test_insert_s32_s16_offset8
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0, $vgpr1
|
|
|
|
; CHECK-LABEL: name: test_insert_s32_s16_offset8
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
|
|
; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
|
|
; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
|
|
; CHECK: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C]]
|
|
; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
|
|
; CHECK: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND]], [[C1]](s32)
|
|
; CHECK: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 -16776961
|
|
; CHECK: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C2]]
|
|
; CHECK: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND1]], [[SHL]]
|
|
; CHECK: [[COPY3:%[0-9]+]]:_(s32) = COPY [[OR]](s32)
|
|
; CHECK: $vgpr0 = COPY [[COPY3]](s32)
|
|
%0:_(s32) = COPY $vgpr0
|
|
%1:_(s32) = COPY $vgpr1
|
|
%2:_(s16) = G_TRUNC %1
|
|
%3:_(s32) = G_INSERT %1, %2, 8
|
|
$vgpr0 = COPY %3
|
|
...
|
|
|
|
---
|
|
name: test_insert_s32_s16_offset16
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0, $vgpr1
|
|
|
|
; CHECK-LABEL: name: test_insert_s32_s16_offset16
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
|
|
; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
|
|
; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
|
|
; CHECK: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C]]
|
|
; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
|
|
; CHECK: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND]], [[C1]](s32)
|
|
; CHECK: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C]]
|
|
; CHECK: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND1]], [[SHL]]
|
|
; CHECK: [[COPY3:%[0-9]+]]:_(s32) = COPY [[OR]](s32)
|
|
; CHECK: $vgpr0 = COPY [[COPY3]](s32)
|
|
%0:_(s32) = COPY $vgpr0
|
|
%1:_(s32) = COPY $vgpr1
|
|
%2:_(s16) = G_TRUNC %1
|
|
%3:_(s32) = G_INSERT %1, %2, 16
|
|
$vgpr0 = COPY %3
|
|
...
|