Home | History | Annotate | Download | only in GlobalISel
      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 ---
      5 name: test_gep_global_i64_idx
      6 body: |
      7   bb.0:
      8     liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
      9 
     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
     18 
     19     $vgpr0_vgpr1 = COPY %2
     20 ...
     21 
     22 ---
     23 name: test_gep_flat_i64_idx
     24 body: |
     25   bb.0:
     26     liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
     27 
     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
     36 
     37     $vgpr0_vgpr1 = COPY %2
     38 ...
     39 
     40 ---
     41 name: test_gep_constant_i64_idx
     42 body: |
     43   bb.0:
     44     liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
     45 
     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
     54 
     55     $vgpr0_vgpr1 = COPY %2
     56 ...
     57 
     58 ---
     59 name: test_gep_local_i32_idx
     60 body: |
     61   bb.0:
     62     liveins: $vgpr0, $vgpr1
     63 
     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
     72 
     73     $vgpr0 = COPY %2
     74 ...
     75 
     76 ---
     77 name: test_gep_private_i32_idx
     78 body: |
     79   bb.0:
     80     liveins: $vgpr0, $vgpr1
     81 
     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
     90 
     91     $vgpr0 = COPY %2
     92 ...
     93