# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -mtriple=riscv32 -mattr=+d -run-pass=legalizer %s -o - \
# RUN: | FileCheck %s
# RUN: llc -mtriple=riscv64 -mattr=+d -run-pass=legalizer %s -o - \
# RUN: | FileCheck %s
---
name: fp_store_f32
body: |
bb.1:
liveins: $x10, $f10_f
; CHECK-LABEL: name: fp_store_f32
; CHECK: liveins: $x10, $f10_f
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x10
; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $f10_f
; CHECK-NEXT: G_STORE [[COPY1]](s32), [[COPY]](p0) :: (store (s32))
; CHECK-NEXT: PseudoRET
%0:_(p0) = COPY $x10
%1:_(s32) = COPY $f10_f
G_STORE %1(s32), %0(p0) :: (store (s32))
PseudoRET
...
---
name: fp_store_f64
body: |
bb.1:
liveins: $x10, $f10_d
; CHECK-LABEL: name: fp_store_f64
; CHECK: liveins: $x10, $f10_d
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x10
; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $f10_d
; CHECK-NEXT: G_STORE [[COPY1]](s64), [[COPY]](p0) :: (store (s64))
; CHECK-NEXT: PseudoRET
%0:_(p0) = COPY $x10
%1:_(s64) = COPY $f10_d
G_STORE %1(s64), %0(p0) :: (store (s64))
PseudoRET
...
---
name: fp_load_f32
body: |
bb.1:
liveins: $x10, $f10_f
; CHECK-LABEL: name: fp_load_f32
; CHECK: liveins: $x10, $f10_f
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x10
; CHECK-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[COPY]](p0) :: (load (s32))
; CHECK-NEXT: $f10_f = COPY [[LOAD]](s32)
; CHECK-NEXT: PseudoRET implicit $f10_f
%0:_(p0) = COPY $x10
%2:_(s32) = G_LOAD %0(p0) :: (load (s32))
$f10_f = COPY %2(s32)
PseudoRET implicit $f10_f
...
---
name: fp_load_f64
body: |
bb.1:
liveins: $x10, $f10_d
; CHECK-LABEL: name: fp_load_f64
; CHECK: liveins: $x10, $f10_d
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $x10
; CHECK-NEXT: [[LOAD:%[0-9]+]]:_(s64) = G_LOAD [[COPY]](p0) :: (load (s64))
; CHECK-NEXT: $f10_d = COPY [[LOAD]](s64)
; CHECK-NEXT: PseudoRET implicit $f10_d
%0:_(p0) = COPY $x10
%2:_(s64) = G_LOAD %0(p0) :: (load (s64))
$f10_d = COPY %2(s64)
PseudoRET implicit $f10_d
...