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_load_global_i32 6body: | 7 bb.0: 8 liveins: $vgpr0_vgpr1 9 10 ; CHECK-LABEL: name: test_load_global_i32 11 ; CHECK: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1 12 ; CHECK: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p1) :: (load 4, addrspace 1) 13 ; CHECK: $vgpr0 = COPY [[LOAD]](s32) 14 %0:_(p1) = COPY $vgpr0_vgpr1 15 %1:_(s32) = G_LOAD %0 :: (load 4, addrspace 1) 16 17 $vgpr0 = COPY %1 18... 19 20--- 21name: test_load_global_i64 22body: | 23 bb.0: 24 liveins: $vgpr0_vgpr1 25 26 ; CHECK-LABEL: name: test_load_global_i64 27 ; CHECK: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1 28 ; CHECK: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p1) :: (load 4, addrspace 1) 29 ; CHECK: $vgpr0 = COPY [[LOAD]](s32) 30 %0:_(p1) = COPY $vgpr0_vgpr1 31 %1:_(s32) = G_LOAD %0 :: (load 4, addrspace 1) 32 33 $vgpr0 = COPY %1 34... 35 36--- 37name: test_load_global_p1 38body: | 39 bb.0: 40 liveins: $vgpr0_vgpr1 41 42 ; CHECK-LABEL: name: test_load_global_p1 43 ; CHECK: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1 44 ; CHECK: [[LOAD:%[0-9]+]]:_(p1) = G_LOAD [[COPY]](p1) :: (load 8, addrspace 1) 45 ; CHECK: $vgpr0_vgpr1 = COPY [[LOAD]](p1) 46 %0:_(p1) = COPY $vgpr0_vgpr1 47 %1:_(p1) = G_LOAD %0 :: (load 8, addrspace 1) 48 49 $vgpr0_vgpr1 = COPY %1 50... 51 52--- 53name: test_load_global_p4 54body: | 55 bb.0: 56 liveins: $vgpr0_vgpr1 57 58 ; CHECK-LABEL: name: test_load_global_p4 59 ; CHECK: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1 60 ; CHECK: [[LOAD:%[0-9]+]]:_(p4) = G_LOAD [[COPY]](p1) :: (load 8, addrspace 1) 61 ; CHECK: $vgpr0_vgpr1 = COPY [[LOAD]](p4) 62 %0:_(p1) = COPY $vgpr0_vgpr1 63 %1:_(p4) = G_LOAD %0 :: (load 8, addrspace 1) 64 65 $vgpr0_vgpr1 = COPY %1 66... 67 68 69--- 70name: test_load_global_p3 71body: | 72 bb.0: 73 liveins: $vgpr0_vgpr1 74 75 ; CHECK-LABEL: name: test_load_global_p3 76 ; CHECK: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1 77 ; CHECK: [[LOAD:%[0-9]+]]:_(p3) = G_LOAD [[COPY]](p1) :: (load 4, addrspace 1) 78 ; CHECK: $vgpr0 = COPY [[LOAD]](p3) 79 %0:_(p1) = COPY $vgpr0_vgpr1 80 %1:_(p3) = G_LOAD %0 :: (load 4, addrspace 1) 81 82 $vgpr0 = COPY %1 83... 84 85--- 86name: test_load_global_v2s32 87body: | 88 bb.0: 89 liveins: $vgpr0_vgpr1 90 91 ; CHECK-LABEL: name: test_load_global_v2s32 92 ; CHECK: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1 93 ; CHECK: [[LOAD:%[0-9]+]]:_(<2 x s32>) = G_LOAD [[COPY]](p1) :: (load 8, addrspace 1) 94 ; CHECK: $vgpr0_vgpr1 = COPY [[LOAD]](<2 x s32>) 95 %0:_(p1) = COPY $vgpr0_vgpr1 96 %1:_(<2 x s32>) = G_LOAD %0 :: (load 8, addrspace 1) 97 98 $vgpr0_vgpr1 = COPY %1 99... 100 101--- 102 103name: test_load_global_v2s16 104body: | 105 bb.0: 106 liveins: $vgpr0_vgpr1 107 108 ; CHECK-LABEL: name: test_load_global_v2s16 109 ; CHECK: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1 110 ; CHECK: [[LOAD:%[0-9]+]]:_(<2 x s16>) = G_LOAD [[COPY]](p1) :: (load 4, addrspace 1) 111 ; CHECK: $vgpr0 = COPY [[LOAD]](<2 x s16>) 112 %0:_(p1) = COPY $vgpr0_vgpr1 113 %1:_(<2 x s16>) = G_LOAD %0 :: (load 4, addrspace 1) 114 $vgpr0 = COPY %1 115... 116 117--- 118name: test_load_global_v3i32 119body: | 120 bb.0: 121 liveins: $vgpr0_vgpr1 122 123 ; CHECK-LABEL: name: test_load_global_v3i32 124 ; CHECK: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1 125 ; CHECK: [[LOAD:%[0-9]+]]:_(<3 x s32>) = G_LOAD [[COPY]](p1) :: (load 12, align 4, addrspace 1) 126 ; CHECK: $vgpr0_vgpr1_vgpr2 = COPY [[LOAD]](<3 x s32>) 127 %0:_(p1) = COPY $vgpr0_vgpr1 128 %1:_(<3 x s32>) = G_LOAD %0 :: (load 12, align 4, addrspace 1) 129 130 $vgpr0_vgpr1_vgpr2 = COPY %1 131... 132