Home | History | Annotate | Download | only in GlobalISel
      1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
      2 # RUN: llc -mtriple=aarch64-- -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s
      3 
      4 --- |
      5   target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
      6 
      7   define void @inttoptr_p0_s64() { ret void }
      8   define void @ptrtoint_s64_p0() { ret void }
      9   define void @ptrtoint_s32_p0() { ret void }
     10   define void @ptrtoint_s16_p0() { ret void }
     11   define void @ptrtoint_s8_p0() { ret void }
     12   define void @ptrtoint_s1_p0() { ret void }
     13 ...
     14 
     15 ---
     16 name:            inttoptr_p0_s64
     17 legalized:       true
     18 regBankSelected: true
     19 
     20 registers:
     21   - { id: 0, class: gpr }
     22   - { id: 1, class: gpr }
     23 body:             |
     24   bb.0:
     25     liveins: $x0
     26     ; CHECK-LABEL: name: inttoptr_p0_s64
     27     ; CHECK: [[COPY:%[0-9]+]]:gpr64all = COPY $x0
     28     ; CHECK: $x0 = COPY [[COPY]]
     29     %0(s64) = COPY $x0
     30     %1(p0) = G_INTTOPTR %0
     31     $x0 = COPY %1(p0)
     32 ...
     33 
     34 ---
     35 name:            ptrtoint_s64_p0
     36 legalized:       true
     37 regBankSelected: true
     38 
     39 registers:
     40   - { id: 0, class: gpr }
     41   - { id: 1, class: gpr }
     42 body:             |
     43   bb.0:
     44     liveins: $x0
     45     ; CHECK-LABEL: name: ptrtoint_s64_p0
     46     ; CHECK: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
     47     ; CHECK: $x0 = COPY [[COPY]]
     48     %0(p0) = COPY $x0
     49     %1(s64) = G_PTRTOINT %0
     50     $x0 = COPY %1(s64)
     51 ...
     52 
     53 ---
     54 name:            ptrtoint_s32_p0
     55 legalized:       true
     56 regBankSelected: true
     57 
     58 registers:
     59   - { id: 0, class: gpr }
     60   - { id: 1, class: gpr }
     61 body:             |
     62   bb.0:
     63     liveins: $x0
     64     ; CHECK-LABEL: name: ptrtoint_s32_p0
     65     ; CHECK: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
     66     ; CHECK: [[COPY1:%[0-9]+]]:gpr32 = COPY [[COPY]].sub_32
     67     ; CHECK: $w0 = COPY [[COPY1]]
     68     %0(p0) = COPY $x0
     69     %1(s32) = G_PTRTOINT %0
     70     $w0 = COPY %1(s32)
     71 ...
     72 
     73 ---
     74 name:            ptrtoint_s16_p0
     75 legalized:       true
     76 regBankSelected: true
     77 
     78 registers:
     79   - { id: 0, class: gpr }
     80   - { id: 1, class: gpr }
     81 body:             |
     82   bb.0:
     83     liveins: $x0
     84     ; CHECK-LABEL: name: ptrtoint_s16_p0
     85     ; CHECK: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
     86     ; CHECK: [[COPY1:%[0-9]+]]:gpr32 = COPY [[COPY]].sub_32
     87     ; CHECK: [[COPY2:%[0-9]+]]:gpr32all = COPY [[COPY1]]
     88     ; CHECK: $w0 = COPY [[COPY2]]
     89     %0(p0) = COPY $x0
     90     %1(s16) = G_PTRTOINT %0
     91     %2:gpr(s32) = G_ANYEXT %1
     92     $w0 = COPY %2(s32)
     93 ...
     94 
     95 ---
     96 name:            ptrtoint_s8_p0
     97 legalized:       true
     98 regBankSelected: true
     99 
    100 registers:
    101   - { id: 0, class: gpr }
    102   - { id: 1, class: gpr }
    103 body:             |
    104   bb.0:
    105     liveins: $x0
    106     ; CHECK-LABEL: name: ptrtoint_s8_p0
    107     ; CHECK: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
    108     ; CHECK: [[COPY1:%[0-9]+]]:gpr32 = COPY [[COPY]].sub_32
    109     ; CHECK: [[COPY2:%[0-9]+]]:gpr32all = COPY [[COPY1]]
    110     ; CHECK: $w0 = COPY [[COPY2]]
    111     %0(p0) = COPY $x0
    112     %1(s8) = G_PTRTOINT %0
    113     %2:gpr(s32) = G_ANYEXT %1
    114     $w0 = COPY %2(s32)
    115 ...
    116 
    117 ---
    118 name:            ptrtoint_s1_p0
    119 legalized:       true
    120 regBankSelected: true
    121 
    122 registers:
    123   - { id: 0, class: gpr }
    124   - { id: 1, class: gpr }
    125 body:             |
    126   bb.0:
    127     liveins: $x0
    128     ; CHECK-LABEL: name: ptrtoint_s1_p0
    129     ; CHECK: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
    130     ; CHECK: [[COPY1:%[0-9]+]]:gpr32 = COPY [[COPY]].sub_32
    131     ; CHECK: [[COPY2:%[0-9]+]]:gpr32all = COPY [[COPY1]]
    132     ; CHECK: $w0 = COPY [[COPY2]]
    133     %0(p0) = COPY $x0
    134     %1(s1) = G_PTRTOINT %0
    135     %2:gpr(s32) = G_ANYEXT %1
    136     $w0 = COPY %2(s32)
    137 ...
    138