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_gep_global_i64_idx
8 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
10 ; CHECK-LABEL: name: test_gep_global_i64_idx
11 ; CHECK: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
12 ; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr2_vgpr3
13 ; CHECK: [[GEP:%[0-9]+]]:_(p1) = G_GEP [[COPY]], [[COPY1]](s64)
14 ; CHECK: $vgpr0_vgpr1 = COPY [[GEP]](p1)
15 %0:_(p1) = COPY $vgpr0_vgpr1
16 %1:_(s64) = COPY $vgpr2_vgpr3
17 %2:_(p1) = G_GEP %0, %1
19 $vgpr0_vgpr1 = COPY %2
23 name: test_gep_flat_i64_idx
26 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
28 ; CHECK-LABEL: name: test_gep_flat_i64_idx
29 ; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY $vgpr0_vgpr1
30 ; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr2_vgpr3
31 ; CHECK: [[GEP:%[0-9]+]]:_(p0) = G_GEP [[COPY]], [[COPY1]](s64)
32 ; CHECK: $vgpr0_vgpr1 = COPY [[GEP]](p0)
33 %0:_(p0) = COPY $vgpr0_vgpr1
34 %1:_(s64) = COPY $vgpr2_vgpr3
35 %2:_(p0) = G_GEP %0, %1
37 $vgpr0_vgpr1 = COPY %2
41 name: test_gep_constant_i64_idx
44 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
46 ; CHECK-LABEL: name: test_gep_constant_i64_idx
47 ; CHECK: [[COPY:%[0-9]+]]:_(p4) = COPY $vgpr0_vgpr1
48 ; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr2_vgpr3
49 ; CHECK: [[GEP:%[0-9]+]]:_(p4) = G_GEP [[COPY]], [[COPY1]](s64)
50 ; CHECK: $vgpr0_vgpr1 = COPY [[GEP]](p4)
51 %0:_(p4) = COPY $vgpr0_vgpr1
52 %1:_(s64) = COPY $vgpr2_vgpr3
53 %2:_(p4) = G_GEP %0, %1
55 $vgpr0_vgpr1 = COPY %2
59 name: test_gep_local_i32_idx
62 liveins: $vgpr0, $vgpr1
64 ; CHECK-LABEL: name: test_gep_local_i32_idx
65 ; CHECK: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0
66 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
67 ; CHECK: [[GEP:%[0-9]+]]:_(p3) = G_GEP [[COPY]], [[COPY1]](s32)
68 ; CHECK: $vgpr0 = COPY [[GEP]](p3)
69 %0:_(p3) = COPY $vgpr0
70 %1:_(s32) = COPY $vgpr1
71 %2:_(p3) = G_GEP %0, %1
77 name: test_gep_private_i32_idx
80 liveins: $vgpr0, $vgpr1
82 ; CHECK-LABEL: name: test_gep_private_i32_idx
83 ; CHECK: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0
84 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
85 ; CHECK: [[GEP:%[0-9]+]]:_(p5) = G_GEP [[COPY]], [[COPY1]](s32)
86 ; CHECK: $vgpr0 = COPY [[GEP]](p5)
87 %0:_(p5) = COPY $vgpr0
88 %1:_(s32) = COPY $vgpr1
89 %2:_(p5) = G_GEP %0, %1
95 name: test_gep_constant32_i32_idx
98 liveins: $sgpr0, $sgpr1
100 ; CHECK-LABEL: name: test_gep_constant32_i32_idx
101 ; CHECK: [[COPY:%[0-9]+]]:_(p6) = COPY $sgpr0
102 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $sgpr1
103 ; CHECK: [[GEP:%[0-9]+]]:_(p6) = G_GEP [[COPY]], [[COPY1]](s32)
104 ; CHECK: $sgpr0 = COPY [[GEP]](p6)
105 %0:_(p6) = COPY $sgpr0
106 %1:_(s32) = COPY $sgpr1
107 %2:_(p6) = G_GEP %0, %1
113 name: test_gep_region_i32_idx
116 liveins: $vgpr0, $vgpr1
118 ; CHECK-LABEL: name: test_gep_region_i32_idx
119 ; CHECK: [[COPY:%[0-9]+]]:_(p2) = COPY $vgpr0
120 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
121 ; CHECK: [[GEP:%[0-9]+]]:_(p2) = G_GEP [[COPY]], [[COPY1]](s32)
122 ; CHECK: $vgpr0 = COPY [[GEP]](p2)
123 %0:_(p2) = COPY $vgpr0
124 %1:_(s32) = COPY $vgpr1
125 %2:_(p2) = G_GEP %0, %1