1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc --mtriple=loongarch64 --mattr=+lsx < %s | FileCheck %s
4 declare <4 x float> @llvm.loongarch.lsx.vffint.s.w(<4 x i32>)
6 define <4 x float> @lsx_vffint_s_w(<4 x i32> %va) nounwind {
7 ; CHECK-LABEL: lsx_vffint_s_w:
8 ; CHECK: # %bb.0: # %entry
9 ; CHECK-NEXT: vffint.s.w $vr0, $vr0
12 %res = call <4 x float> @llvm.loongarch.lsx.vffint.s.w(<4 x i32> %va)
16 declare <2 x double> @llvm.loongarch.lsx.vffint.d.l(<2 x i64>)
18 define <2 x double> @lsx_vffint_d_l(<2 x i64> %va) nounwind {
19 ; CHECK-LABEL: lsx_vffint_d_l:
20 ; CHECK: # %bb.0: # %entry
21 ; CHECK-NEXT: vffint.d.l $vr0, $vr0
24 %res = call <2 x double> @llvm.loongarch.lsx.vffint.d.l(<2 x i64> %va)
28 declare <4 x float> @llvm.loongarch.lsx.vffint.s.wu(<4 x i32>)
30 define <4 x float> @lsx_vffint_s_wu(<4 x i32> %va) nounwind {
31 ; CHECK-LABEL: lsx_vffint_s_wu:
32 ; CHECK: # %bb.0: # %entry
33 ; CHECK-NEXT: vffint.s.wu $vr0, $vr0
36 %res = call <4 x float> @llvm.loongarch.lsx.vffint.s.wu(<4 x i32> %va)
40 declare <2 x double> @llvm.loongarch.lsx.vffint.d.lu(<2 x i64>)
42 define <2 x double> @lsx_vffint_d_lu(<2 x i64> %va) nounwind {
43 ; CHECK-LABEL: lsx_vffint_d_lu:
44 ; CHECK: # %bb.0: # %entry
45 ; CHECK-NEXT: vffint.d.lu $vr0, $vr0
48 %res = call <2 x double> @llvm.loongarch.lsx.vffint.d.lu(<2 x i64> %va)
52 declare <2 x double> @llvm.loongarch.lsx.vffintl.d.w(<4 x i32>)
54 define <2 x double> @lsx_vffintl_d_w(<4 x i32> %va) nounwind {
55 ; CHECK-LABEL: lsx_vffintl_d_w:
56 ; CHECK: # %bb.0: # %entry
57 ; CHECK-NEXT: vffintl.d.w $vr0, $vr0
60 %res = call <2 x double> @llvm.loongarch.lsx.vffintl.d.w(<4 x i32> %va)
64 declare <2 x double> @llvm.loongarch.lsx.vffinth.d.w(<4 x i32>)
66 define <2 x double> @lsx_vffinth_d_w(<4 x i32> %va) nounwind {
67 ; CHECK-LABEL: lsx_vffinth_d_w:
68 ; CHECK: # %bb.0: # %entry
69 ; CHECK-NEXT: vffinth.d.w $vr0, $vr0
72 %res = call <2 x double> @llvm.loongarch.lsx.vffinth.d.w(<4 x i32> %va)
76 declare <4 x float> @llvm.loongarch.lsx.vffint.s.l(<2 x i64>, <2 x i64>)
78 define <4 x float> @lsx_vffint_s_l(<2 x i64> %va, <2 x i64> %vb) nounwind {
79 ; CHECK-LABEL: lsx_vffint_s_l:
80 ; CHECK: # %bb.0: # %entry
81 ; CHECK-NEXT: vffint.s.l $vr0, $vr0, $vr1
84 %res = call <4 x float> @llvm.loongarch.lsx.vffint.s.l(<2 x i64> %va, <2 x i64> %vb)