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: liveins: $vgpr0_vgpr1
13 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
14 ; CHECK-NEXT: [[SEXT_INREG:%[0-9]+]]:_(s64) = G_SEXT_INREG [[COPY]], 32
15 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[SEXT_INREG]](s64)
16 %0:_(s64) = COPY $vgpr0_vgpr1
17 %1:_(s32) = G_TRUNC %0
19 $vgpr0_vgpr1 = COPY %2
23 name: test_zext_trunc_i64_i32_i64
28 ; CHECK-LABEL: name: test_zext_trunc_i64_i32_i64
29 ; CHECK: liveins: $vgpr0_vgpr1
31 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
32 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 4294967295
33 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[C]]
34 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[AND]](s64)
35 %0:_(s64) = COPY $vgpr0_vgpr1
36 %1:_(s32) = G_TRUNC %0
38 $vgpr0_vgpr1 = COPY %2
42 name: test_zext_zext_i32_i48_i64
47 ; CHECK-LABEL: name: test_zext_zext_i32_i48_i64
48 ; CHECK: liveins: $vgpr0_vgpr1
50 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
51 ; CHECK-NEXT: [[ZEXT:%[0-9]+]]:_(s64) = G_ZEXT [[COPY]](s32)
52 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[ZEXT]](s64)
53 %0:_(s32) = COPY $vgpr0
56 $vgpr0_vgpr1 = COPY %2
60 name: test_sext_zext_i32_i48_i64
65 ; CHECK-LABEL: name: test_sext_zext_i32_i48_i64
66 ; CHECK: liveins: $vgpr0_vgpr1
68 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
69 ; CHECK-NEXT: [[ZEXT:%[0-9]+]]:_(s64) = G_ZEXT [[COPY]](s32)
70 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[ZEXT]](s64)
71 %0:_(s32) = COPY $vgpr0
74 $vgpr0_vgpr1 = COPY %2
78 name: test_sext_sext_i32_i48_i64
83 ; CHECK-LABEL: name: test_sext_sext_i32_i48_i64
84 ; CHECK: liveins: $vgpr0_vgpr1
86 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
87 ; CHECK-NEXT: [[SEXT:%[0-9]+]]:_(s64) = G_SEXT [[COPY]](s32)
88 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[SEXT]](s64)
89 %0:_(s32) = COPY $vgpr0
92 $vgpr0_vgpr1 = COPY %2