1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 5
2 # RUN: llc -mtriple=riscv64 -mattr=+zbb,+f -run-pass=instruction-select %s -o - | FileCheck %s
8 tracksRegLiveness: true
10 ; CHECK-LABEL: name: foo
12 ; CHECK-NEXT: successors: %bb.1(0x80000000)
14 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x0
17 ; CHECK-NEXT: successors: %bb.1(0x80000000)
19 ; CHECK-NEXT: [[PHI:%[0-9]+]]:gpr = PHI [[COPY]], %bb.0, %6, %bb.1
20 ; CHECK-NEXT: [[ADDIW:%[0-9]+]]:gpr = ADDIW [[PHI]], 0
21 ; CHECK-NEXT: [[FCVT_S_W:%[0-9]+]]:fpr32 = nofpexcept FCVT_S_W [[ADDIW]], 7
22 ; CHECK-NEXT: [[FCVT_W_S:%[0-9]+]]:gpr = nofpexcept FCVT_W_S [[FCVT_S_W]], 1
23 ; CHECK-NEXT: PseudoBR %bb.1
25 %7:gprb(s64) = G_CONSTANT i64 0
26 %3:gprb(s32) = G_TRUNC %7(s64)
29 %0:gprb(s32) = G_PHI %3(s32), %bb.1, %2(s32), %bb.2
30 %6:gprb(s64) = G_SEXT %0(s32)
31 %1:fprb(s32) = G_SITOFP %6(s64)
32 %5:gprb(s64) = G_FCVT_W_RV64 %1(s32), 1
33 %2:gprb(s32) = G_TRUNC %5(s64)