2018-03-12 21:35:53 +08:00
|
|
|
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
|
2018-05-06 05:19:59 +08:00
|
|
|
# RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=fiji -run-pass=legalizer %s -o - | FileCheck %s
|
2018-03-12 21:35:53 +08:00
|
|
|
|
|
|
|
---
|
2019-07-16 03:37:34 +08:00
|
|
|
name: insert_vector_elt_0_v2s32
|
2018-03-12 21:35:53 +08:00
|
|
|
|
|
|
|
body: |
|
|
|
|
bb.0:
|
|
|
|
liveins: $vgpr0_vgpr1, $vgpr2
|
2019-07-16 03:37:34 +08:00
|
|
|
; CHECK-LABEL: name: insert_vector_elt_0_v2s32
|
2018-03-12 21:35:53 +08:00
|
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr0_vgpr1
|
|
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
|
|
|
|
; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
|
|
|
|
; CHECK: [[IVEC:%[0-9]+]]:_(<2 x s32>) = G_INSERT_VECTOR_ELT [[COPY]], [[COPY1]](s32), [[C]](s32)
|
|
|
|
; CHECK: $vgpr0_vgpr1 = COPY [[IVEC]](<2 x s32>)
|
|
|
|
%0:_(<2 x s32>) = COPY $vgpr0_vgpr1
|
|
|
|
%1:_(s32) = COPY $vgpr2
|
|
|
|
%2:_(s32) = G_CONSTANT i32 0
|
|
|
|
%3:_(<2 x s32>) = G_INSERT_VECTOR_ELT %0, %1, %2
|
|
|
|
$vgpr0_vgpr1 = COPY %3
|
|
|
|
...
|
2019-07-16 03:37:34 +08:00
|
|
|
|
|
|
|
---
|
|
|
|
name: insert_vector_elt_v2s32_varidx_i64
|
|
|
|
|
|
|
|
body: |
|
|
|
|
bb.0:
|
|
|
|
liveins: $vgpr0_vgpr1, $vgpr2, $vgpr3_vgpr4
|
|
|
|
|
|
|
|
; CHECK-LABEL: name: insert_vector_elt_v2s32_varidx_i64
|
|
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr0_vgpr1
|
|
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
|
|
|
|
; CHECK: [[COPY2:%[0-9]+]]:_(s64) = COPY $vgpr3_vgpr4
|
|
|
|
; CHECK: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY2]](s64)
|
|
|
|
; CHECK: [[IVEC:%[0-9]+]]:_(<2 x s32>) = G_INSERT_VECTOR_ELT [[COPY]], [[COPY1]](s32), [[TRUNC]](s32)
|
|
|
|
; CHECK: $vgpr0_vgpr1 = COPY [[IVEC]](<2 x s32>)
|
|
|
|
%0:_(<2 x s32>) = COPY $vgpr0_vgpr1
|
|
|
|
%1:_(s32) = COPY $vgpr2
|
|
|
|
%2:_(s64) = COPY $vgpr3_vgpr4
|
|
|
|
%3:_(<2 x s32>) = G_INSERT_VECTOR_ELT %0, %1, %2
|
|
|
|
$vgpr0_vgpr1 = COPY %3
|
|
|
|
...
|
|
|
|
|
|
|
|
---
|
|
|
|
name: insert_vector_elt_v16s32_varidx_i64
|
|
|
|
|
|
|
|
body: |
|
|
|
|
bb.0:
|
|
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15, $vgpr16, $vgpr17_vgpr18
|
|
|
|
|
|
|
|
; CHECK-LABEL: name: insert_vector_elt_v16s32_varidx_i64
|
|
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<16 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15
|
|
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr16
|
|
|
|
; CHECK: [[COPY2:%[0-9]+]]:_(s64) = COPY $vgpr17_vgpr18
|
|
|
|
; CHECK: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY2]](s64)
|
|
|
|
; CHECK: [[IVEC:%[0-9]+]]:_(<16 x s32>) = G_INSERT_VECTOR_ELT [[COPY]], [[COPY1]](s32), [[TRUNC]](s32)
|
|
|
|
; CHECK: S_ENDPGM 0, implicit [[IVEC]](<16 x s32>)
|
|
|
|
%0:_(<16 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15
|
|
|
|
%1:_(s32) = COPY $vgpr16
|
|
|
|
%2:_(s64) = COPY $vgpr17_vgpr18
|
|
|
|
%3:_(<16 x s32>) = G_INSERT_VECTOR_ELT %0, %1, %2
|
|
|
|
S_ENDPGM 0, implicit %3
|
|
|
|
...
|