1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py 2# RUN: llc -O0 -run-pass=legalizer %s -o - | FileCheck %s 3 4--- | 5 target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" 6 target triple = "aarch64--" 7 8 define void @test_fptosi_s32_s32() { ret void } 9 define void @test_fptoui_s32_s32() { ret void } 10 define void @test_fptosi_s32_s64() { ret void } 11 define void @test_fptoui_s32_s64() { ret void } 12 13 define void @test_fptosi_s64_s32() { ret void } 14 define void @test_fptoui_s64_s32() { ret void } 15 define void @test_fptosi_s64_s64() { ret void } 16 define void @test_fptoui_s64_s64() { ret void } 17 18 define void @test_fptosi_s1_s32() { ret void } 19 define void @test_fptoui_s1_s32() { ret void } 20 21 define void @test_fptosi_s8_s64() { ret void } 22 define void @test_fptoui_s8_s64() { ret void } 23 24 define void @test_fptosi_s16_s32() { ret void } 25 define void @test_fptoui_s16_s32() { ret void } 26 27 define void @test_fptoui_v4s32() { ret void } 28 define void @test_fptosi_v4s32() { ret void } 29... 30 31--- 32name: test_fptosi_s32_s32 33body: | 34 bb.0: 35 liveins: $w0 36 ; CHECK-LABEL: name: test_fptosi_s32_s32 37 ; CHECK: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF 38 ; CHECK: [[FPTOSI:%[0-9]+]]:_(s32) = G_FPTOSI [[DEF]](s32) 39 ; CHECK: $w0 = COPY [[FPTOSI]](s32) 40 %0:_(s32) = G_IMPLICIT_DEF 41 %1:_(s32) = G_FPTOSI %0 42 $w0 = COPY %1 43... 44 45--- 46name: test_fptoui_s32_s32 47body: | 48 bb.0: 49 liveins: $w0 50 ; CHECK-LABEL: name: test_fptoui_s32_s32 51 ; CHECK: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF 52 ; CHECK: [[FPTOUI:%[0-9]+]]:_(s32) = G_FPTOUI [[DEF]](s32) 53 ; CHECK: $w0 = COPY [[FPTOUI]](s32) 54 %0:_(s32) = G_IMPLICIT_DEF 55 %1:_(s32) = G_FPTOUI %0 56 $w0 = COPY %1 57... 58 59--- 60name: test_fptosi_s32_s64 61body: | 62 bb.0: 63 liveins: $x0 64 ; CHECK-LABEL: name: test_fptosi_s32_s64 65 ; CHECK: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF 66 ; CHECK: [[FPTOSI:%[0-9]+]]:_(s32) = G_FPTOSI [[DEF]](s32) 67 ; CHECK: $w0 = COPY [[FPTOSI]](s32) 68 %0:_(s32) = G_IMPLICIT_DEF 69 %1:_(s32) = G_FPTOSI %0 70 $w0 = COPY %1 71... 72 73--- 74name: test_fptoui_s32_s64 75body: | 76 bb.0: 77 liveins: $x0 78 ; CHECK-LABEL: name: test_fptoui_s32_s64 79 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0 80 ; CHECK: [[FPTOUI:%[0-9]+]]:_(s32) = G_FPTOUI [[COPY]](s64) 81 ; CHECK: $w0 = COPY [[FPTOUI]](s32) 82 %0:_(s64) = COPY $x0 83 %1:_(s32) = G_FPTOUI %0 84 $w0 = COPY %1 85... 86 87--- 88name: test_fptosi_s64_s32 89body: | 90 bb.0: 91 liveins: $w0 92 ; CHECK-LABEL: name: test_fptosi_s64_s32 93 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0 94 ; CHECK: [[FPTOSI:%[0-9]+]]:_(s64) = G_FPTOSI [[COPY]](s32) 95 ; CHECK: $x0 = COPY [[FPTOSI]](s64) 96 %0:_(s32) = COPY $w0 97 %1:_(s64) = G_FPTOSI %0 98 $x0 = COPY %1 99... 100 101--- 102name: test_fptoui_s64_s32 103body: | 104 bb.0: 105 liveins: $w0 106 ; CHECK-LABEL: name: test_fptoui_s64_s32 107 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0 108 ; CHECK: [[FPTOUI:%[0-9]+]]:_(s64) = G_FPTOUI [[COPY]](s32) 109 ; CHECK: $x0 = COPY [[FPTOUI]](s64) 110 %0:_(s32) = COPY $w0 111 %1:_(s64) = G_FPTOUI %0 112 $x0 = COPY %1 113... 114 115--- 116name: test_fptosi_s64_s64 117body: | 118 bb.0: 119 liveins: $x0 120 ; CHECK-LABEL: name: test_fptosi_s64_s64 121 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0 122 ; CHECK: [[FPTOSI:%[0-9]+]]:_(s64) = G_FPTOSI [[COPY]](s64) 123 ; CHECK: $x0 = COPY [[FPTOSI]](s64) 124 %0:_(s64) = COPY $x0 125 %1:_(s64) = G_FPTOSI %0 126 $x0 = COPY %1 127... 128 129--- 130name: test_fptoui_s64_s64 131body: | 132 bb.0: 133 liveins: $x0 134 ; CHECK-LABEL: name: test_fptoui_s64_s64 135 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0 136 ; CHECK: [[FPTOUI:%[0-9]+]]:_(s64) = G_FPTOUI [[COPY]](s64) 137 ; CHECK: $x0 = COPY [[FPTOUI]](s64) 138 %0:_(s64) = COPY $x0 139 %1:_(s64) = G_FPTOUI %0 140 $x0 = COPY %1 141... 142 143 144 145--- 146name: test_fptosi_s1_s32 147body: | 148 bb.0: 149 liveins: $w0 150 ; CHECK-LABEL: name: test_fptosi_s1_s32 151 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0 152 ; CHECK: [[FPTOSI:%[0-9]+]]:_(s32) = G_FPTOSI [[COPY]](s32) 153 ; CHECK: [[ANYEXT:%[0-9]+]]:_(s64) = G_ANYEXT [[FPTOSI]](s32) 154 ; CHECK: $x0 = COPY [[ANYEXT]](s64) 155 %0:_(s32) = COPY $w0 156 %1:_(s1) = G_FPTOSI %0 157 %2:_(s64) = G_ANYEXT %1 158 $x0 = COPY %2 159... 160 161--- 162name: test_fptoui_s1_s32 163body: | 164 bb.0: 165 liveins: $w0 166 ; CHECK-LABEL: name: test_fptoui_s1_s32 167 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0 168 ; CHECK: [[FPTOUI:%[0-9]+]]:_(s32) = G_FPTOUI [[COPY]](s32) 169 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[FPTOUI]](s32) 170 ; CHECK: $w0 = COPY [[COPY1]](s32) 171 %0:_(s32) = COPY $w0 172 %1:_(s1) = G_FPTOUI %0 173 %2:_(s32) = G_ANYEXT %1 174 $w0 = COPY %2 175... 176 177--- 178name: test_fptosi_s8_s64 179body: | 180 bb.0: 181 liveins: $x0 182 ; CHECK-LABEL: name: test_fptosi_s8_s64 183 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0 184 ; CHECK: [[FPTOSI:%[0-9]+]]:_(s32) = G_FPTOSI [[COPY]](s64) 185 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[FPTOSI]](s32) 186 ; CHECK: $w0 = COPY [[COPY1]](s32) 187 %0:_(s64) = COPY $x0 188 %1:_(s8) = G_FPTOSI %0 189 %2:_(s32) = G_ANYEXT %1 190 $w0 = COPY %2 191... 192 193--- 194name: test_fptoui_s8_s64 195body: | 196 bb.0: 197 liveins: $x0 198 ; CHECK-LABEL: name: test_fptoui_s8_s64 199 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x0 200 ; CHECK: [[FPTOUI:%[0-9]+]]:_(s32) = G_FPTOUI [[COPY]](s64) 201 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[FPTOUI]](s32) 202 ; CHECK: $w0 = COPY [[COPY1]](s32) 203 %0:_(s64) = COPY $x0 204 %1:_(s8) = G_FPTOUI %0 205 %2:_(s32) = G_ANYEXT %1 206 $w0 = COPY %2 207... 208 209--- 210name: test_fptosi_s16_s32 211body: | 212 bb.0: 213 liveins: $w0 214 ; CHECK-LABEL: name: test_fptosi_s16_s32 215 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0 216 ; CHECK: [[FPTOSI:%[0-9]+]]:_(s32) = G_FPTOSI [[COPY]](s32) 217 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[FPTOSI]](s32) 218 ; CHECK: $w0 = COPY [[COPY1]](s32) 219 %0:_(s32) = COPY $w0 220 %1:_(s16) = G_FPTOSI %0 221 %2:_(s32) = G_ANYEXT %1 222 $w0 = COPY %2 223... 224 225--- 226name: test_fptoui_s16_s32 227body: | 228 bb.0: 229 liveins: $w0 230 ; CHECK-LABEL: name: test_fptoui_s16_s32 231 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0 232 ; CHECK: [[FPTOUI:%[0-9]+]]:_(s32) = G_FPTOUI [[COPY]](s32) 233 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[FPTOUI]](s32) 234 ; CHECK: $w0 = COPY [[COPY1]](s32) 235 %0:_(s32) = COPY $w0 236 %1:_(s16) = G_FPTOUI %0 237 %2:_(s32) = G_ANYEXT %1 238 $w0 = COPY %2 239... 240 241--- 242name: test_fptoui_v4s32 243body: | 244 bb.0: 245 liveins: $q0 246 ; CHECK-LABEL: name: test_fptoui_v4s32 247 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $q0 248 ; CHECK: [[FPTOUI:%[0-9]+]]:_(<4 x s32>) = G_FPTOUI [[COPY]](<4 x s32>) 249 ; CHECK: $q0 = COPY [[FPTOUI]](<4 x s32>) 250 %0:_(<4 x s32>) = COPY $q0 251 %1:_(<4 x s32>) = G_FPTOUI %0 252 $q0 = COPY %1 253... 254 255--- 256name: test_fptosi_v4s32 257body: | 258 bb.0: 259 liveins: $q0 260 ; CHECK-LABEL: name: test_fptosi_v4s32 261 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $q0 262 ; CHECK: [[FPTOSI:%[0-9]+]]:_(<4 x s32>) = G_FPTOSI [[COPY]](<4 x s32>) 263 ; CHECK: $q0 = COPY [[FPTOSI]](<4 x s32>) 264 %0:_(<4 x s32>) = COPY $q0 265 %1:_(<4 x s32>) = G_FPTOSI %0 266 $q0 = COPY %1 267... 268