1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=x86_64-linux-gnu -run-pass=legalizer %s -o - | FileCheck %s --check-prefix=ALL
5 define float @test_fptrunc(double %in) {
6 %res = fptrunc double %in to float
14 tracksRegLiveness: true
24 ; ALL-LABEL: name: test_fptrunc
26 ; ALL: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
27 ; ALL: [[TRUNC:%[0-9]+]]:_(s64) = G_TRUNC [[COPY]](s128)
28 ; ALL: [[FPTRUNC:%[0-9]+]]:_(s32) = G_FPTRUNC [[TRUNC]](s64)
29 ; ALL: [[ANYEXT:%[0-9]+]]:_(s128) = G_ANYEXT [[FPTRUNC]](s32)
30 ; ALL: $xmm0 = COPY [[ANYEXT]](s128)
31 ; ALL: RET 0, implicit $xmm0
32 %1:_(s128) = COPY $xmm0
33 %0:_(s64) = G_TRUNC %1(s128)
34 %2:_(s32) = G_FPTRUNC %0(s64)
35 %3:_(s128) = G_ANYEXT %2(s32)