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 3 4--- 5name: test_sext_trunc_i64_i32_i64 6body: | 7 bb.0: 8 liveins: $vgpr0_vgpr1 9 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: [[SEXT_INREG:%[0-9]+]]:_(s64) = G_SEXT_INREG [[COPY1]], 32 14 ; CHECK: $vgpr0_vgpr1 = COPY [[SEXT_INREG]](s64) 15 %0:_(s64) = COPY $vgpr0_vgpr1 16 %1:_(s32) = G_TRUNC %0 17 %2:_(s64) = G_SEXT %1 18 $vgpr0_vgpr1 = COPY %2 19... 20 21--- 22name: test_zext_trunc_i64_i32_i64 23body: | 24 bb.0: 25 liveins: $vgpr0_vgpr1 26 27 ; CHECK-LABEL: name: test_zext_trunc_i64_i32_i64 28 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1 29 ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 4294967295 30 ; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY [[COPY]](s64) 31 ; CHECK: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY1]], [[C]] 32 ; CHECK: $vgpr0_vgpr1 = COPY [[AND]](s64) 33 %0:_(s64) = COPY $vgpr0_vgpr1 34 %1:_(s32) = G_TRUNC %0 35 %2:_(s64) = G_ZEXT %1 36 $vgpr0_vgpr1 = COPY %2 37... 38 39--- 40name: test_zext_zext_i32_i48_i64 41body: | 42 bb.0: 43 liveins: $vgpr0_vgpr1 44 45 ; CHECK-LABEL: name: test_zext_zext_i32_i48_i64 46 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0 47 ; CHECK: [[ZEXT:%[0-9]+]]:_(s64) = G_ZEXT [[COPY]](s32) 48 ; CHECK: $vgpr0_vgpr1 = COPY [[ZEXT]](s64) 49 %0:_(s32) = COPY $vgpr0 50 %1:_(s48) = G_ZEXT %0 51 %2:_(s64) = G_ZEXT %1 52 $vgpr0_vgpr1 = COPY %2 53... 54 55--- 56name: test_sext_zext_i32_i48_i64 57body: | 58 bb.0: 59 liveins: $vgpr0_vgpr1 60 61 ; CHECK-LABEL: name: test_sext_zext_i32_i48_i64 62 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0 63 ; CHECK: [[ZEXT:%[0-9]+]]:_(s64) = G_ZEXT [[COPY]](s32) 64 ; CHECK: $vgpr0_vgpr1 = COPY [[ZEXT]](s64) 65 %0:_(s32) = COPY $vgpr0 66 %1:_(s48) = G_ZEXT %0 67 %2:_(s64) = G_SEXT %1 68 $vgpr0_vgpr1 = COPY %2 69... 70 71--- 72name: test_sext_sext_i32_i48_i64 73body: | 74 bb.0: 75 liveins: $vgpr0_vgpr1 76 77 ; CHECK-LABEL: name: test_sext_sext_i32_i48_i64 78 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0 79 ; CHECK: [[SEXT:%[0-9]+]]:_(s64) = G_SEXT [[COPY]](s32) 80 ; CHECK: $vgpr0_vgpr1 = COPY [[SEXT]](s64) 81 %0:_(s32) = COPY $vgpr0 82 %1:_(s48) = G_SEXT %0 83 %2:_(s64) = G_SEXT %1 84 $vgpr0_vgpr1 = COPY %2 85... 86