1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -march=amdgcn -run-pass=regbankselect %s -verify-machineinstrs -o - -regbankselect-fast | FileCheck %s
3 # RUN: llc -march=amdgcn -run-pass=regbankselect %s -verify-machineinstrs -o - -regbankselect-greedy | FileCheck %s
13 ; CHECK-LABEL: name: gep_p1_s_k
14 ; CHECK: [[COPY:%[0-9]+]]:sgpr(p1) = COPY $sgpr0_sgpr1
15 ; CHECK: [[C:%[0-9]+]]:sgpr(s64) = G_CONSTANT i64 1
16 ; CHECK: [[GEP:%[0-9]+]]:sgpr(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
17 %0:_(p1) = COPY $sgpr0_sgpr1
18 %1:_(s64) = G_CONSTANT i64 1
19 %2:_(p1) = G_PTR_ADD %0, %1
28 liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
30 ; CHECK-LABEL: name: gep_p1_s_s
31 ; CHECK: [[COPY:%[0-9]+]]:sgpr(p1) = COPY $sgpr0_sgpr1
32 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s64) = COPY $sgpr2_sgpr3
33 ; CHECK: [[GEP:%[0-9]+]]:sgpr(p1) = G_PTR_ADD [[COPY]], [[COPY1]](s64)
34 %0:_(p1) = COPY $sgpr0_sgpr1
35 %1:_(s64) = COPY $sgpr2_sgpr3
36 %2:_(p1) = G_PTR_ADD %0, %1
47 ; CHECK-LABEL: name: gep_p1_v_k
48 ; CHECK: [[COPY:%[0-9]+]]:vgpr(p1) = COPY $vgpr0_vgpr1
49 ; CHECK: [[C:%[0-9]+]]:sgpr(s64) = G_CONSTANT i64 1
50 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(s64) = COPY [[C]](s64)
51 ; CHECK: [[GEP:%[0-9]+]]:vgpr(p1) = G_PTR_ADD [[COPY]], [[COPY1]](s64)
52 %0:_(p1) = COPY $vgpr0_vgpr1
53 %1:_(s64) = G_CONSTANT i64 1
54 %2:_(p1) = G_PTR_ADD %0, %1
63 liveins: $vgpr0_vgpr1, $sgpr0_sgpr1
65 ; CHECK-LABEL: name: gep_p1_v_s
66 ; CHECK: [[COPY:%[0-9]+]]:vgpr(p1) = COPY $vgpr0_vgpr1
67 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
68 ; CHECK: [[COPY2:%[0-9]+]]:vgpr(s64) = COPY [[COPY1]](s64)
69 ; CHECK: [[GEP:%[0-9]+]]:vgpr(p1) = G_PTR_ADD [[COPY]], [[COPY2]](s64)
70 %0:_(p1) = COPY $vgpr0_vgpr1
71 %1:_(s64) = COPY $sgpr0_sgpr1
72 %2:_(p1) = G_PTR_ADD %0, %1
81 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
83 ; CHECK-LABEL: name: gep_p1_v_v
84 ; CHECK: [[COPY:%[0-9]+]]:vgpr(p1) = COPY $vgpr0_vgpr1
85 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(s64) = COPY $vgpr2_vgpr3
86 ; CHECK: [[GEP:%[0-9]+]]:vgpr(p1) = G_PTR_ADD [[COPY]], [[COPY1]](s64)
87 %0:_(p1) = COPY $vgpr0_vgpr1
88 %1:_(s64) = COPY $vgpr2_vgpr3
89 %2:_(p1) = G_PTR_ADD %0, %1