forked from OSchip/llvm-project
125 lines
3.4 KiB
YAML
125 lines
3.4 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 -o - %s | FileCheck %s
|
|
|
|
---
|
|
name: test_trunc_s64_to_s32
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1
|
|
|
|
; CHECK-LABEL: name: test_trunc_s64_to_s32
|
|
; 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:_(s32) = G_TRUNC %0
|
|
$vgpr0 = COPY %1
|
|
...
|
|
|
|
---
|
|
name: test_trunc_s64_to_s16
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1
|
|
|
|
; CHECK-LABEL: name: test_trunc_s64_to_s16
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
|
|
; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY]](s64)
|
|
; CHECK: S_ENDPGM 0, implicit [[TRUNC]](s16)
|
|
%0:_(s64) = COPY $vgpr0_vgpr1
|
|
%1:_(s16) = G_TRUNC %0
|
|
S_ENDPGM 0, implicit %1
|
|
...
|
|
|
|
---
|
|
name: test_trunc_v2s32_to_v2s16
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1
|
|
|
|
; CHECK-LABEL: name: test_trunc_v2s32_to_v2s16
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr0_vgpr1
|
|
; CHECK: [[TRUNC:%[0-9]+]]:_(<2 x s16>) = G_TRUNC [[COPY]](<2 x s32>)
|
|
; CHECK: $vgpr0 = COPY [[TRUNC]](<2 x s16>)
|
|
%0:_(<2 x s32>) = COPY $vgpr0_vgpr1
|
|
%1:_(<2 x s16>) = G_TRUNC %0
|
|
$vgpr0 = COPY %1
|
|
...
|
|
|
|
---
|
|
name: test_trunc_v4s32_to_v4s16
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3
|
|
|
|
; CHECK-LABEL: name: test_trunc_v4s32_to_v4s16
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[TRUNC:%[0-9]+]]:_(<4 x s16>) = G_TRUNC [[COPY]](<4 x s32>)
|
|
; CHECK: $vgpr0_vgpr1 = COPY [[TRUNC]](<4 x s16>)
|
|
%0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(<4 x s16>) = G_TRUNC %0
|
|
$vgpr0_vgpr1 = COPY %1
|
|
...
|
|
|
|
---
|
|
name: test_trunc_s64_to_s1
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1
|
|
|
|
; CHECK-LABEL: name: test_trunc_s64_to_s1
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
|
|
; CHECK: [[TRUNC:%[0-9]+]]:_(s1) = G_TRUNC [[COPY]](s64)
|
|
; CHECK: S_ENDPGM 0, implicit [[TRUNC]](s1)
|
|
%0:_(s64) = COPY $vgpr0_vgpr1
|
|
%1:_(s1) = G_TRUNC %0
|
|
S_ENDPGM 0, implicit %1
|
|
...
|
|
|
|
---
|
|
name: test_trunc_s32_to_s1
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0
|
|
|
|
; CHECK-LABEL: name: test_trunc_s32_to_s1
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
|
|
; CHECK: [[TRUNC:%[0-9]+]]:_(s1) = G_TRUNC [[COPY]](s32)
|
|
; CHECK: S_ENDPGM 0, implicit [[TRUNC]](s1)
|
|
%0:_(s32) = COPY $vgpr0
|
|
%1:_(s1) = G_TRUNC %0
|
|
S_ENDPGM 0, implicit %1
|
|
...
|
|
|
|
---
|
|
name: test_trunc_s16_to_s1
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0
|
|
|
|
; CHECK-LABEL: name: test_trunc_s16_to_s1
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
|
|
; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY]](s32)
|
|
; CHECK: [[TRUNC1:%[0-9]+]]:_(s1) = G_TRUNC [[TRUNC]](s16)
|
|
; CHECK: S_ENDPGM 0, implicit [[TRUNC1]](s1)
|
|
%0:_(s32) = COPY $vgpr0
|
|
%1:_(s16) = G_TRUNC %0
|
|
%2:_(s1) = G_TRUNC %1
|
|
S_ENDPGM 0, implicit %2
|
|
...
|
|
|
|
---
|
|
name: test_trunc_v4s32_to_v4s1
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0_vgpr1_vgpr2_vgpr3
|
|
|
|
; CHECK-LABEL: name: test_trunc_v4s32_to_v4s1
|
|
; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
; CHECK: [[TRUNC:%[0-9]+]]:_(<4 x s1>) = G_TRUNC [[COPY]](<4 x s32>)
|
|
; CHECK: S_ENDPGM 0, implicit [[TRUNC]](<4 x s1>)
|
|
%0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
|
|
%1:_(<4 x s1>) = G_TRUNC %0
|
|
S_ENDPGM 0, implicit %1
|
|
...
|