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.vfrintrne.s(<4 x float>)
6 define <4 x float> @lsx_vfrintrne_s(<4 x float> %va) nounwind {
7 ; CHECK-LABEL: lsx_vfrintrne_s:
8 ; CHECK: # %bb.0: # %entry
9 ; CHECK-NEXT: vfrintrne.s $vr0, $vr0
12 %res = call <4 x float> @llvm.loongarch.lsx.vfrintrne.s(<4 x float> %va)
16 declare <2 x double> @llvm.loongarch.lsx.vfrintrne.d(<2 x double>)
18 define <2 x double> @lsx_vfrintrne_d(<2 x double> %va) nounwind {
19 ; CHECK-LABEL: lsx_vfrintrne_d:
20 ; CHECK: # %bb.0: # %entry
21 ; CHECK-NEXT: vfrintrne.d $vr0, $vr0
24 %res = call <2 x double> @llvm.loongarch.lsx.vfrintrne.d(<2 x double> %va)
28 declare <4 x float> @llvm.loongarch.lsx.vfrintrz.s(<4 x float>)
30 define <4 x float> @lsx_vfrintrz_s(<4 x float> %va) nounwind {
31 ; CHECK-LABEL: lsx_vfrintrz_s:
32 ; CHECK: # %bb.0: # %entry
33 ; CHECK-NEXT: vfrintrz.s $vr0, $vr0
36 %res = call <4 x float> @llvm.loongarch.lsx.vfrintrz.s(<4 x float> %va)
40 declare <2 x double> @llvm.loongarch.lsx.vfrintrz.d(<2 x double>)
42 define <2 x double> @lsx_vfrintrz_d(<2 x double> %va) nounwind {
43 ; CHECK-LABEL: lsx_vfrintrz_d:
44 ; CHECK: # %bb.0: # %entry
45 ; CHECK-NEXT: vfrintrz.d $vr0, $vr0
48 %res = call <2 x double> @llvm.loongarch.lsx.vfrintrz.d(<2 x double> %va)
52 declare <4 x float> @llvm.loongarch.lsx.vfrintrp.s(<4 x float>)
54 define <4 x float> @lsx_vfrintrp_s(<4 x float> %va) nounwind {
55 ; CHECK-LABEL: lsx_vfrintrp_s:
56 ; CHECK: # %bb.0: # %entry
57 ; CHECK-NEXT: vfrintrp.s $vr0, $vr0
60 %res = call <4 x float> @llvm.loongarch.lsx.vfrintrp.s(<4 x float> %va)
64 declare <2 x double> @llvm.loongarch.lsx.vfrintrp.d(<2 x double>)
66 define <2 x double> @lsx_vfrintrp_d(<2 x double> %va) nounwind {
67 ; CHECK-LABEL: lsx_vfrintrp_d:
68 ; CHECK: # %bb.0: # %entry
69 ; CHECK-NEXT: vfrintrp.d $vr0, $vr0
72 %res = call <2 x double> @llvm.loongarch.lsx.vfrintrp.d(<2 x double> %va)
76 declare <4 x float> @llvm.loongarch.lsx.vfrintrm.s(<4 x float>)
78 define <4 x float> @lsx_vfrintrm_s(<4 x float> %va) nounwind {
79 ; CHECK-LABEL: lsx_vfrintrm_s:
80 ; CHECK: # %bb.0: # %entry
81 ; CHECK-NEXT: vfrintrm.s $vr0, $vr0
84 %res = call <4 x float> @llvm.loongarch.lsx.vfrintrm.s(<4 x float> %va)
88 declare <2 x double> @llvm.loongarch.lsx.vfrintrm.d(<2 x double>)
90 define <2 x double> @lsx_vfrintrm_d(<2 x double> %va) nounwind {
91 ; CHECK-LABEL: lsx_vfrintrm_d:
92 ; CHECK: # %bb.0: # %entry
93 ; CHECK-NEXT: vfrintrm.d $vr0, $vr0
96 %res = call <2 x double> @llvm.loongarch.lsx.vfrintrm.d(<2 x double> %va)
100 declare <4 x float> @llvm.loongarch.lsx.vfrint.s(<4 x float>)
102 define <4 x float> @lsx_vfrint_s(<4 x float> %va) nounwind {
103 ; CHECK-LABEL: lsx_vfrint_s:
104 ; CHECK: # %bb.0: # %entry
105 ; CHECK-NEXT: vfrint.s $vr0, $vr0
108 %res = call <4 x float> @llvm.loongarch.lsx.vfrint.s(<4 x float> %va)
112 declare <2 x double> @llvm.loongarch.lsx.vfrint.d(<2 x double>)
114 define <2 x double> @lsx_vfrint_d(<2 x double> %va) nounwind {
115 ; CHECK-LABEL: lsx_vfrint_d:
116 ; CHECK: # %bb.0: # %entry
117 ; CHECK-NEXT: vfrint.d $vr0, $vr0
120 %res = call <2 x double> @llvm.loongarch.lsx.vfrint.d(<2 x double> %va)
121 ret <2 x double> %res