1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py 2# RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=fiji -run-pass=legalizer -o - %s | FileCheck %s 3# RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=tahiti -run-pass=legalizer -o - %s | FileCheck %s 4--- 5name: test_sextload_local_i32_i8 6body: | 7 bb.0: 8 liveins: $vgpr0 9 10 ; CHECK-LABEL: name: test_sextload_local_i32_i8 11 ; CHECK: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 12 ; CHECK: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p3) :: (load 1, addrspace 3) 13 ; CHECK: $vgpr0 = COPY [[SEXTLOAD]](s32) 14 %0:_(p3) = COPY $vgpr0 15 %1:_(s32) = G_SEXTLOAD %0 :: (load 1, addrspace 3) 16 $vgpr0 = COPY %1 17... 18--- 19name: test_sextload_local_i32_i16 20body: | 21 bb.0: 22 liveins: $vgpr0 23 24 ; CHECK-LABEL: name: test_sextload_local_i32_i16 25 ; CHECK: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 26 ; CHECK: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p3) :: (load 2, addrspace 3) 27 ; CHECK: $vgpr0 = COPY [[SEXTLOAD]](s32) 28 %0:_(p3) = COPY $vgpr0 29 %1:_(s32) = G_SEXTLOAD %0 :: (load 2, addrspace 3) 30 $vgpr0 = COPY %1 31... 32--- 33name: test_sextload_local_i31_i8 34body: | 35 bb.0: 36 liveins: $vgpr0 37 38 ; CHECK-LABEL: name: test_sextload_local_i31_i8 39 ; CHECK: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 40 ; CHECK: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p3) :: (load 1, addrspace 3) 41 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[SEXTLOAD]](s32) 42 ; CHECK: $vgpr0 = COPY [[COPY1]](s32) 43 %0:_(p3) = COPY $vgpr0 44 %1:_(s31) = G_SEXTLOAD %0 :: (load 1, addrspace 3) 45 %2:_(s32) = G_ANYEXT %1 46 $vgpr0 = COPY %2 47... 48--- 49name: test_sextload_local_i64_i8 50body: | 51 bb.0: 52 liveins: $vgpr0 53 54 ; CHECK-LABEL: name: test_sextload_local_i64_i8 55 ; CHECK: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 56 ; CHECK: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p3) :: (load 1, addrspace 3) 57 ; CHECK: [[SEXT:%[0-9]+]]:_(s64) = G_SEXT [[SEXTLOAD]](s32) 58 ; CHECK: $vgpr0_vgpr1 = COPY [[SEXT]](s64) 59 %0:_(p3) = COPY $vgpr0 60 %1:_(s64) = G_SEXTLOAD %0 :: (load 1, addrspace 3) 61 $vgpr0_vgpr1 = COPY %1 62... 63--- 64name: test_sextload_local_i64_i16 65body: | 66 bb.0: 67 liveins: $vgpr0 68 69 ; CHECK-LABEL: name: test_sextload_local_i64_i16 70 ; CHECK: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 71 ; CHECK: [[SEXTLOAD:%[0-9]+]]:_(s32) = G_SEXTLOAD [[COPY]](p3) :: (load 2, addrspace 3) 72 ; CHECK: [[SEXT:%[0-9]+]]:_(s64) = G_SEXT [[SEXTLOAD]](s32) 73 ; CHECK: $vgpr0_vgpr1 = COPY [[SEXT]](s64) 74 %0:_(p3) = COPY $vgpr0 75 %1:_(s64) = G_SEXTLOAD %0 :: (load 2, addrspace 3) 76 $vgpr0_vgpr1 = COPY %1 77... 78--- 79name: test_sextload_local_i64_i32 80body: | 81 bb.0: 82 liveins: $vgpr0_vgpr1 83 84 ; CHECK-LABEL: name: test_sextload_local_i64_i32 85 ; CHECK: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0 86 ; CHECK: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p3) :: (load 4, addrspace 3) 87 ; CHECK: [[SEXT:%[0-9]+]]:_(s64) = G_SEXT [[LOAD]](s32) 88 ; CHECK: $vgpr0_vgpr1 = COPY [[SEXT]](s64) 89 %0:_(p3) = COPY $vgpr0 90 %1:_(s64) = G_SEXTLOAD %0 :: (load 4, addrspace 3) 91 $vgpr0_vgpr1 = COPY %1 92... 93