1 ; NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 4
2 ; RUN: llc -mtriple=riscv32 -global-isel -mattr=+d -stop-after=legalizer -verify-machineinstrs < %s \
3 ; RUN: | FileCheck -check-prefixes=CHECK %s
5 define i64 @double_to_i64(double %a) {
6 ; CHECK-LABEL: name: double_to_i64
7 ; CHECK: bb.1 (%ir-block.0):
8 ; CHECK-NEXT: liveins: $f10_d
10 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $f10_d
11 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](s64)
12 ; CHECK-NEXT: $x10 = COPY [[UV]](s32)
13 ; CHECK-NEXT: $x11 = COPY [[UV1]](s32)
14 ; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11
15 %1 = bitcast double %a to i64
19 define double @i64_to_double(i64 %a) {
20 ; CHECK-LABEL: name: i64_to_double
21 ; CHECK: bb.1 (%ir-block.0):
22 ; CHECK-NEXT: liveins: $x10, $x11
24 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $x10
25 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x11
26 ; CHECK-NEXT: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[COPY]](s32), [[COPY1]](s32)
27 ; CHECK-NEXT: $f10_d = COPY [[MV]](s64)
28 ; CHECK-NEXT: PseudoRET implicit $f10_d
29 %1 = bitcast i64 %a to double