1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 3
2 ; RUN: llc --mtriple=loongarch64 --mattr=+lsx < %s | FileCheck %s
4 define void @sitofp_v4i32_v4f32(ptr %res, ptr %in){
5 ; CHECK-LABEL: sitofp_v4i32_v4f32:
7 ; CHECK-NEXT: vld $vr0, $a1, 0
8 ; CHECK-NEXT: vffint.s.w $vr0, $vr0
9 ; CHECK-NEXT: vst $vr0, $a0, 0
11 %v0 = load <4 x i32>, ptr %in
12 %v1 = sitofp <4 x i32> %v0 to <4 x float>
13 store <4 x float> %v1, ptr %res
17 define void @sitofp_v2i64_v2f64(ptr %res, ptr %in){
18 ; CHECK-LABEL: sitofp_v2i64_v2f64:
20 ; CHECK-NEXT: vld $vr0, $a1, 0
21 ; CHECK-NEXT: vffint.d.l $vr0, $vr0
22 ; CHECK-NEXT: vst $vr0, $a0, 0
24 %v0 = load <2 x i64>, ptr %in
25 %v1 = sitofp <2 x i64> %v0 to <2 x double>
26 store <2 x double> %v1, ptr %res