307 lines · plain
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py2# RUN: llc -O0 -mtriple=x86_64-linux-gnu -global-isel -run-pass=legalizer -verify-machineinstrs %s -o - | FileCheck %s3 4--- |5 ; ModuleID = 'sitofp.ll'6 source_filename = "sitofp.c"7 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"8 target triple = "x86_64-unknown-linux-gnu"9 10 ; Function Attrs: norecurse nounwind readnone uwtable11 define dso_local float @int8_to_float(i8 signext %a) local_unnamed_addr #0 {12 entry:13 %conv = sitofp i8 %a to float14 ret float %conv15 }16 17 ; Function Attrs: norecurse nounwind readnone uwtable18 define dso_local float @int16_to_float(i16 signext %a) local_unnamed_addr #0 {19 entry:20 %conv = sitofp i16 %a to float21 ret float %conv22 }23 24 ; Function Attrs: norecurse nounwind readnone uwtable25 define dso_local float @int32_to_float(i32 %a) local_unnamed_addr #0 {26 entry:27 %conv = sitofp i32 %a to float28 ret float %conv29 }30 31 ; Function Attrs: norecurse nounwind readnone uwtable32 define dso_local float @int64_to_float(i64 %a) local_unnamed_addr #0 {33 entry:34 %conv = sitofp i64 %a to float35 ret float %conv36 }37 38 ; Function Attrs: norecurse nounwind readnone uwtable39 define dso_local double @int8_to_double(i8 signext %a) local_unnamed_addr #0 {40 entry:41 %conv = sitofp i8 %a to double42 ret double %conv43 }44 45 ; Function Attrs: norecurse nounwind readnone uwtable46 define dso_local double @int16_to_double(i16 signext %a) local_unnamed_addr #0 {47 entry:48 %conv = sitofp i16 %a to double49 ret double %conv50 }51 52 ; Function Attrs: norecurse nounwind readnone uwtable53 define dso_local double @int32_to_double(i32 %a) local_unnamed_addr #0 {54 entry:55 %conv = sitofp i32 %a to double56 ret double %conv57 }58 59 ; Function Attrs: norecurse nounwind readnone uwtable60 define dso_local double @int64_to_double(i64 %a) local_unnamed_addr #0 {61 entry:62 %conv = sitofp i64 %a to double63 ret double %conv64 }65 66 attributes #0 = { norecurse nounwind readnone uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="none" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "use-soft-float"="false" }67 68 !llvm.module.flags = !{!0}69 !llvm.ident = !{!1}70 71 !0 = !{i32 1, !"wchar_size", i32 4}72 !1 = !{!"clang version 7.0.0"}73 74...75---76name: int8_to_float77alignment: 1678tracksRegLiveness: true79registers:80 - { id: 0, class: _ }81 - { id: 1, class: _ }82 - { id: 2, class: _ }83 - { id: 3, class: _ }84body: |85 bb.1.entry:86 liveins: $edi87 88 ; CHECK-LABEL: name: int8_to_float89 ; CHECK: liveins: $edi90 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $edi91 ; CHECK: [[C:%[0-9]+]]:_(s8) = G_CONSTANT i8 2492 ; CHECK: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s8)93 ; CHECK: [[COPY1:%[0-9]+]]:_(s8) = COPY [[C]](s8)94 ; CHECK: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[COPY1]](s8)95 ; CHECK: [[SITOFP:%[0-9]+]]:_(s32) = G_SITOFP [[ASHR]](s32)96 ; CHECK: [[ANYEXT:%[0-9]+]]:_(s128) = G_ANYEXT [[SITOFP]](s32)97 ; CHECK: $xmm0 = COPY [[ANYEXT]](s128)98 ; CHECK: RET 0, implicit $xmm099 %1:_(s32) = COPY $edi100 %0:_(s8) = G_TRUNC %1(s32)101 %2:_(s32) = G_SITOFP %0(s8)102 %3:_(s128) = G_ANYEXT %2(s32)103 $xmm0 = COPY %3(s128)104 RET 0, implicit $xmm0105 106...107---108name: int16_to_float109alignment: 16110tracksRegLiveness: true111registers:112 - { id: 0, class: _ }113 - { id: 1, class: _ }114 - { id: 2, class: _ }115 - { id: 3, class: _ }116body: |117 bb.1.entry:118 liveins: $edi119 120 ; CHECK-LABEL: name: int16_to_float121 ; CHECK: liveins: $edi122 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $edi123 ; CHECK: [[C:%[0-9]+]]:_(s8) = G_CONSTANT i8 16124 ; CHECK: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s8)125 ; CHECK: [[COPY1:%[0-9]+]]:_(s8) = COPY [[C]](s8)126 ; CHECK: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[COPY1]](s8)127 ; CHECK: [[SITOFP:%[0-9]+]]:_(s32) = G_SITOFP [[ASHR]](s32)128 ; CHECK: [[ANYEXT:%[0-9]+]]:_(s128) = G_ANYEXT [[SITOFP]](s32)129 ; CHECK: $xmm0 = COPY [[ANYEXT]](s128)130 ; CHECK: RET 0, implicit $xmm0131 %1:_(s32) = COPY $edi132 %0:_(s16) = G_TRUNC %1(s32)133 %2:_(s32) = G_SITOFP %0(s16)134 %3:_(s128) = G_ANYEXT %2(s32)135 $xmm0 = COPY %3(s128)136 RET 0, implicit $xmm0137 138...139---140name: int32_to_float141alignment: 16142tracksRegLiveness: true143registers:144 - { id: 0, class: _ }145 - { id: 1, class: _ }146 - { id: 2, class: _ }147body: |148 bb.1.entry:149 liveins: $edi150 151 ; CHECK-LABEL: name: int32_to_float152 ; CHECK: liveins: $edi153 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $edi154 ; CHECK: [[SITOFP:%[0-9]+]]:_(s32) = G_SITOFP [[COPY]](s32)155 ; CHECK: [[ANYEXT:%[0-9]+]]:_(s128) = G_ANYEXT [[SITOFP]](s32)156 ; CHECK: $xmm0 = COPY [[ANYEXT]](s128)157 ; CHECK: RET 0, implicit $xmm0158 %0:_(s32) = COPY $edi159 %1:_(s32) = G_SITOFP %0(s32)160 %2:_(s128) = G_ANYEXT %1(s32)161 $xmm0 = COPY %2(s128)162 RET 0, implicit $xmm0163 164...165---166name: int64_to_float167alignment: 16168tracksRegLiveness: true169registers:170 - { id: 0, class: _ }171 - { id: 1, class: _ }172 - { id: 2, class: _ }173body: |174 bb.1.entry:175 liveins: $rdi176 177 ; CHECK-LABEL: name: int64_to_float178 ; CHECK: liveins: $rdi179 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $rdi180 ; CHECK: [[SITOFP:%[0-9]+]]:_(s32) = G_SITOFP [[COPY]](s64)181 ; CHECK: [[ANYEXT:%[0-9]+]]:_(s128) = G_ANYEXT [[SITOFP]](s32)182 ; CHECK: $xmm0 = COPY [[ANYEXT]](s128)183 ; CHECK: RET 0, implicit $xmm0184 %0:_(s64) = COPY $rdi185 %1:_(s32) = G_SITOFP %0(s64)186 %2:_(s128) = G_ANYEXT %1(s32)187 $xmm0 = COPY %2(s128)188 RET 0, implicit $xmm0189 190...191---192name: int8_to_double193alignment: 16194tracksRegLiveness: true195registers:196 - { id: 0, class: _ }197 - { id: 1, class: _ }198 - { id: 2, class: _ }199 - { id: 3, class: _ }200body: |201 bb.1.entry:202 liveins: $edi203 204 ; CHECK-LABEL: name: int8_to_double205 ; CHECK: liveins: $edi206 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $edi207 ; CHECK: [[C:%[0-9]+]]:_(s8) = G_CONSTANT i8 24208 ; CHECK: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s8)209 ; CHECK: [[COPY1:%[0-9]+]]:_(s8) = COPY [[C]](s8)210 ; CHECK: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[COPY1]](s8)211 ; CHECK: [[SITOFP:%[0-9]+]]:_(s64) = G_SITOFP [[ASHR]](s32)212 ; CHECK: [[ANYEXT:%[0-9]+]]:_(s128) = G_ANYEXT [[SITOFP]](s64)213 ; CHECK: $xmm0 = COPY [[ANYEXT]](s128)214 ; CHECK: RET 0, implicit $xmm0215 %1:_(s32) = COPY $edi216 %0:_(s8) = G_TRUNC %1(s32)217 %2:_(s64) = G_SITOFP %0(s8)218 %3:_(s128) = G_ANYEXT %2(s64)219 $xmm0 = COPY %3(s128)220 RET 0, implicit $xmm0221 222...223---224name: int16_to_double225alignment: 16226tracksRegLiveness: true227registers:228 - { id: 0, class: _ }229 - { id: 1, class: _ }230 - { id: 2, class: _ }231 - { id: 3, class: _ }232body: |233 bb.1.entry:234 liveins: $edi235 236 ; CHECK-LABEL: name: int16_to_double237 ; CHECK: liveins: $edi238 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $edi239 ; CHECK: [[C:%[0-9]+]]:_(s8) = G_CONSTANT i8 16240 ; CHECK: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]](s8)241 ; CHECK: [[COPY1:%[0-9]+]]:_(s8) = COPY [[C]](s8)242 ; CHECK: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[SHL]], [[COPY1]](s8)243 ; CHECK: [[SITOFP:%[0-9]+]]:_(s64) = G_SITOFP [[ASHR]](s32)244 ; CHECK: [[ANYEXT:%[0-9]+]]:_(s128) = G_ANYEXT [[SITOFP]](s64)245 ; CHECK: $xmm0 = COPY [[ANYEXT]](s128)246 ; CHECK: RET 0, implicit $xmm0247 %1:_(s32) = COPY $edi248 %0:_(s16) = G_TRUNC %1(s32)249 %2:_(s64) = G_SITOFP %0(s16)250 %3:_(s128) = G_ANYEXT %2(s64)251 $xmm0 = COPY %3(s128)252 RET 0, implicit $xmm0253 254...255---256name: int32_to_double257alignment: 16258tracksRegLiveness: true259registers:260 - { id: 0, class: _ }261 - { id: 1, class: _ }262 - { id: 2, class: _ }263body: |264 bb.1.entry:265 liveins: $edi266 267 ; CHECK-LABEL: name: int32_to_double268 ; CHECK: liveins: $edi269 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $edi270 ; CHECK: [[SITOFP:%[0-9]+]]:_(s64) = G_SITOFP [[COPY]](s32)271 ; CHECK: [[ANYEXT:%[0-9]+]]:_(s128) = G_ANYEXT [[SITOFP]](s64)272 ; CHECK: $xmm0 = COPY [[ANYEXT]](s128)273 ; CHECK: RET 0, implicit $xmm0274 %0:_(s32) = COPY $edi275 %1:_(s64) = G_SITOFP %0(s32)276 %2:_(s128) = G_ANYEXT %1(s64)277 $xmm0 = COPY %2(s128)278 RET 0, implicit $xmm0279 280...281---282name: int64_to_double283alignment: 16284tracksRegLiveness: true285registers:286 - { id: 0, class: _ }287 - { id: 1, class: _ }288 - { id: 2, class: _ }289body: |290 bb.1.entry:291 liveins: $rdi292 293 ; CHECK-LABEL: name: int64_to_double294 ; CHECK: liveins: $rdi295 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $rdi296 ; CHECK: [[SITOFP:%[0-9]+]]:_(s64) = G_SITOFP [[COPY]](s64)297 ; CHECK: [[ANYEXT:%[0-9]+]]:_(s128) = G_ANYEXT [[SITOFP]](s64)298 ; CHECK: $xmm0 = COPY [[ANYEXT]](s128)299 ; CHECK: RET 0, implicit $xmm0300 %0:_(s64) = COPY $rdi301 %1:_(s64) = G_SITOFP %0(s64)302 %2:_(s128) = G_ANYEXT %1(s64)303 $xmm0 = COPY %2(s128)304 RET 0, implicit $xmm0305 306...307