1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=fiji -O0 -run-pass=legalizer %s -o - | FileCheck %s
5 name: test_sext_trunc_i64_i32_i64
10 ; CHECK-LABEL: name: test_sext_trunc_i64_i32_i64
11 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
12 ; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY [[COPY]](s64)
13 ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 32
14 ; CHECK: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[C]](s64)
15 ; CHECK: [[SHL:%[0-9]+]]:_(s64) = G_SHL [[COPY1]], [[TRUNC]](s32)
16 ; CHECK: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[C]](s64)
17 ; CHECK: [[ASHR:%[0-9]+]]:_(s64) = G_ASHR [[SHL]], [[TRUNC1]](s32)
18 ; CHECK: $vgpr0_vgpr1 = COPY [[ASHR]](s64)
19 %0:_(s64) = COPY $vgpr0_vgpr1
20 %1:_(s32) = G_TRUNC %0
22 $vgpr0_vgpr1 = COPY %2
26 name: test_zext_trunc_i64_i32_i64
31 ; CHECK-LABEL: name: test_zext_trunc_i64_i32_i64
32 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
33 ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 4294967295
34 ; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY [[COPY]](s64)
35 ; CHECK: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY1]], [[C]]
36 ; CHECK: $vgpr0_vgpr1 = COPY [[AND]](s64)
37 %0:_(s64) = COPY $vgpr0_vgpr1
38 %1:_(s32) = G_TRUNC %0
40 $vgpr0_vgpr1 = COPY %2