1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=riscv32 -run-pass=legalizer -verify-machineinstrs %s -o - | FileCheck %s
10 ; CHECK-LABEL: name: p0_s32
11 ; CHECK: liveins: $x10
13 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
14 ; CHECK-NEXT: [[INTTOPTR:%[0-9]+]]:_(p0) = G_INTTOPTR [[COPY]](s32)
15 ; CHECK-NEXT: $x10 = COPY [[INTTOPTR]](p0)
16 ; CHECK-NEXT: PseudoRET implicit $x10
18 %1:_(p0) = G_INTTOPTR %0(s32)
20 PseudoRET implicit $x10
29 ; CHECK-LABEL: name: p0_s16
30 ; CHECK: liveins: $x10
32 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
33 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
34 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]
35 ; CHECK-NEXT: [[INTTOPTR:%[0-9]+]]:_(p0) = G_INTTOPTR [[AND]](s32)
36 ; CHECK-NEXT: $x10 = COPY [[INTTOPTR]](p0)
37 ; CHECK-NEXT: PseudoRET implicit $x10
39 %0:_(s16) = G_TRUNC %1(s32)
40 %2:_(p0) = G_INTTOPTR %0(s16)
42 PseudoRET implicit $x10
51 ; CHECK-LABEL: name: p0_s8
52 ; CHECK: liveins: $x10
54 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
55 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
56 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]
57 ; CHECK-NEXT: [[INTTOPTR:%[0-9]+]]:_(p0) = G_INTTOPTR [[AND]](s32)
58 ; CHECK-NEXT: $x10 = COPY [[INTTOPTR]](p0)
59 ; CHECK-NEXT: PseudoRET implicit $x10
61 %0:_(s8) = G_TRUNC %1(s32)
62 %2:_(p0) = G_INTTOPTR %0(s8)
64 PseudoRET implicit $x10
73 ; CHECK-LABEL: name: p0_s1
74 ; CHECK: liveins: $x10
76 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
77 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
78 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]
79 ; CHECK-NEXT: [[INTTOPTR:%[0-9]+]]:_(p0) = G_INTTOPTR [[AND]](s32)
80 ; CHECK-NEXT: $x10 = COPY [[INTTOPTR]](p0)
81 ; CHECK-NEXT: PseudoRET implicit $x10
83 %0:_(s1) = G_TRUNC %1(s32)
84 %2:_(p0) = G_INTTOPTR %0(s1)
86 PseudoRET implicit $x10
95 ; CHECK-LABEL: name: p0_s64
96 ; CHECK: liveins: $x10, $x11
98 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
99 ; CHECK-NEXT: [[INTTOPTR:%[0-9]+]]:_(p0) = G_INTTOPTR [[COPY]](s32)
100 ; CHECK-NEXT: $x10 = COPY [[INTTOPTR]](p0)
101 ; CHECK-NEXT: PseudoRET implicit $x10
102 %1:_(s32) = COPY $x10
103 %2:_(s32) = COPY $x11
104 %0:_(s64) = G_MERGE_VALUES %1(s32), %2(s32)
105 %3:_(p0) = G_INTTOPTR %0(s64)
107 PseudoRET implicit $x10
116 ; CHECK-LABEL: name: p0_s44
117 ; CHECK: liveins: $x10, $x11
119 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
120 ; CHECK-NEXT: [[INTTOPTR:%[0-9]+]]:_(p0) = G_INTTOPTR [[COPY]](s32)
121 ; CHECK-NEXT: $x10 = COPY [[INTTOPTR]](p0)
122 ; CHECK-NEXT: PseudoRET implicit $x10
123 %1:_(s32) = COPY $x10
124 %2:_(s32) = COPY $x11
125 %3:_(s64) = G_MERGE_VALUES %1(s32), %2(s32)
126 %0:_(s44) = G_TRUNC %3(s64)
127 %4:_(p0) = G_INTTOPTR %0(s44)
129 PseudoRET implicit $x10