1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=riscv64 -run-pass=legalizer -verify-machineinstrs %s -o - | FileCheck %s
10 ; CHECK-LABEL: name: p0_s64
11 ; CHECK: liveins: $x10
13 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x10
14 ; CHECK-NEXT: [[PTRTOINT:%[0-9]+]]:_(s64) = G_PTRTOINT [[COPY]](p0)
15 ; CHECK-NEXT: $x10 = COPY [[PTRTOINT]](s64)
16 ; CHECK-NEXT: PseudoRET implicit $x10
18 %1:_(s64) = G_PTRTOINT %0(p0)
20 PseudoRET implicit $x10
29 ; CHECK-LABEL: name: p0_s32
30 ; CHECK: liveins: $x10
32 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x10
33 ; CHECK-NEXT: [[PTRTOINT:%[0-9]+]]:_(s64) = G_PTRTOINT [[COPY]](p0)
34 ; CHECK-NEXT: $x10 = COPY [[PTRTOINT]](s64)
35 ; CHECK-NEXT: PseudoRET implicit $x10
37 %1:_(s32) = G_PTRTOINT %0(p0)
38 %2:_(s64) = G_ANYEXT %1(s32)
40 PseudoRET implicit $x10
49 ; CHECK-LABEL: name: p0_s16
50 ; CHECK: liveins: $x10
52 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x10
53 ; CHECK-NEXT: [[PTRTOINT:%[0-9]+]]:_(s64) = G_PTRTOINT [[COPY]](p0)
54 ; CHECK-NEXT: $x10 = COPY [[PTRTOINT]](s64)
55 ; CHECK-NEXT: PseudoRET implicit $x10
57 %1:_(s16) = G_PTRTOINT %0(p0)
58 %2:_(s64) = G_ANYEXT %1(s16)
60 PseudoRET implicit $x10
69 ; CHECK-LABEL: name: p0_s8
70 ; CHECK: liveins: $x10
72 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x10
73 ; CHECK-NEXT: [[PTRTOINT:%[0-9]+]]:_(s64) = G_PTRTOINT [[COPY]](p0)
74 ; CHECK-NEXT: $x10 = COPY [[PTRTOINT]](s64)
75 ; CHECK-NEXT: PseudoRET implicit $x10
77 %1:_(s8) = G_PTRTOINT %0(p0)
78 %2:_(s64) = G_ANYEXT %1(s8)
80 PseudoRET implicit $x10
89 ; CHECK-LABEL: name: p0_s1
90 ; CHECK: liveins: $x10
92 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x10
93 ; CHECK-NEXT: [[PTRTOINT:%[0-9]+]]:_(s64) = G_PTRTOINT [[COPY]](p0)
94 ; CHECK-NEXT: $x10 = COPY [[PTRTOINT]](s64)
95 ; CHECK-NEXT: PseudoRET implicit $x10
97 %1:_(s1) = G_PTRTOINT %0(p0)
98 %2:_(s64) = G_ANYEXT %1(s1)
100 PseudoRET implicit $x10
109 ; CHECK-LABEL: name: p0_s128
110 ; CHECK: liveins: $x10
112 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x10
113 ; CHECK-NEXT: [[PTRTOINT:%[0-9]+]]:_(s64) = G_PTRTOINT [[COPY]](p0)
114 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
115 ; CHECK-NEXT: $x10 = COPY [[PTRTOINT]](s64)
116 ; CHECK-NEXT: $x11 = COPY [[C]](s64)
117 ; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11
119 %1:_(s128) = G_PTRTOINT %0(p0)
120 %2:_(s64), %3:_(s64) = G_UNMERGE_VALUES %1(s128)
123 PseudoRET implicit $x10, implicit $x11
132 ; CHECK-LABEL: name: p0_s88
133 ; CHECK: liveins: $x10
135 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x10
136 ; CHECK-NEXT: [[PTRTOINT:%[0-9]+]]:_(s64) = G_PTRTOINT [[COPY]](p0)
137 ; CHECK-NEXT: $x10 = COPY [[PTRTOINT]](s64)
138 ; CHECK-NEXT: PseudoRET implicit $x10
140 %1:_(s88) = G_PTRTOINT %0(p0)
141 %4:_(s64) = G_TRUNC %1
143 PseudoRET implicit $x10