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
5 target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
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 }
21 - { id: 0, class: gpr }
22 - { id: 1, class: gpr }
26 ; CHECK-LABEL: name: inttoptr_p0_s64
27 ; CHECK: [[COPY:%[0-9]+]]:gpr64all = COPY $x0
28 ; CHECK: $x0 = COPY [[COPY]]
30 %1(p0) = G_INTTOPTR %0
40 - { id: 0, class: gpr }
41 - { id: 1, class: gpr }
45 ; CHECK-LABEL: name: ptrtoint_s64_p0
46 ; CHECK: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
47 ; CHECK: $x0 = COPY [[COPY]]
49 %1(s64) = G_PTRTOINT %0
59 - { id: 0, class: gpr }
60 - { id: 1, class: gpr }
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]]
69 %1(s32) = G_PTRTOINT %0
79 - { id: 0, class: gpr }
80 - { id: 1, class: gpr }
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]]
90 %1(s16) = G_PTRTOINT %0
91 %2:gpr(s32) = G_ANYEXT %1
101 - { id: 0, class: gpr }
102 - { id: 1, class: gpr }
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]]
112 %1(s8) = G_PTRTOINT %0
113 %2:gpr(s32) = G_ANYEXT %1
120 regBankSelected: true
123 - { id: 0, class: gpr }
124 - { id: 1, class: gpr }
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]]
134 %1(s1) = G_PTRTOINT %0
135 %2:gpr(s32) = G_ANYEXT %1