1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc --mtriple=loongarch64 --mattr=+lasx < %s | FileCheck %s
4 declare <8 x float> @llvm.loongarch.lasx.xvfrintrne.s(<8 x float>)
6 define <8 x float> @lasx_xvfrintrne_s(<8 x float> %va) nounwind {
7 ; CHECK-LABEL: lasx_xvfrintrne_s:
8 ; CHECK: # %bb.0: # %entry
9 ; CHECK-NEXT: xvfrintrne.s $xr0, $xr0
12 %res = call <8 x float> @llvm.loongarch.lasx.xvfrintrne.s(<8 x float> %va)
16 declare <4 x double> @llvm.loongarch.lasx.xvfrintrne.d(<4 x double>)
18 define <4 x double> @lasx_xvfrintrne_d(<4 x double> %va) nounwind {
19 ; CHECK-LABEL: lasx_xvfrintrne_d:
20 ; CHECK: # %bb.0: # %entry
21 ; CHECK-NEXT: xvfrintrne.d $xr0, $xr0
24 %res = call <4 x double> @llvm.loongarch.lasx.xvfrintrne.d(<4 x double> %va)
28 declare <8 x float> @llvm.loongarch.lasx.xvfrintrz.s(<8 x float>)
30 define <8 x float> @lasx_xvfrintrz_s(<8 x float> %va) nounwind {
31 ; CHECK-LABEL: lasx_xvfrintrz_s:
32 ; CHECK: # %bb.0: # %entry
33 ; CHECK-NEXT: xvfrintrz.s $xr0, $xr0
36 %res = call <8 x float> @llvm.loongarch.lasx.xvfrintrz.s(<8 x float> %va)
40 declare <4 x double> @llvm.loongarch.lasx.xvfrintrz.d(<4 x double>)
42 define <4 x double> @lasx_xvfrintrz_d(<4 x double> %va) nounwind {
43 ; CHECK-LABEL: lasx_xvfrintrz_d:
44 ; CHECK: # %bb.0: # %entry
45 ; CHECK-NEXT: xvfrintrz.d $xr0, $xr0
48 %res = call <4 x double> @llvm.loongarch.lasx.xvfrintrz.d(<4 x double> %va)
52 declare <8 x float> @llvm.loongarch.lasx.xvfrintrp.s(<8 x float>)
54 define <8 x float> @lasx_xvfrintrp_s(<8 x float> %va) nounwind {
55 ; CHECK-LABEL: lasx_xvfrintrp_s:
56 ; CHECK: # %bb.0: # %entry
57 ; CHECK-NEXT: xvfrintrp.s $xr0, $xr0
60 %res = call <8 x float> @llvm.loongarch.lasx.xvfrintrp.s(<8 x float> %va)
64 declare <4 x double> @llvm.loongarch.lasx.xvfrintrp.d(<4 x double>)
66 define <4 x double> @lasx_xvfrintrp_d(<4 x double> %va) nounwind {
67 ; CHECK-LABEL: lasx_xvfrintrp_d:
68 ; CHECK: # %bb.0: # %entry
69 ; CHECK-NEXT: xvfrintrp.d $xr0, $xr0
72 %res = call <4 x double> @llvm.loongarch.lasx.xvfrintrp.d(<4 x double> %va)
76 declare <8 x float> @llvm.loongarch.lasx.xvfrintrm.s(<8 x float>)
78 define <8 x float> @lasx_xvfrintrm_s(<8 x float> %va) nounwind {
79 ; CHECK-LABEL: lasx_xvfrintrm_s:
80 ; CHECK: # %bb.0: # %entry
81 ; CHECK-NEXT: xvfrintrm.s $xr0, $xr0
84 %res = call <8 x float> @llvm.loongarch.lasx.xvfrintrm.s(<8 x float> %va)
88 declare <4 x double> @llvm.loongarch.lasx.xvfrintrm.d(<4 x double>)
90 define <4 x double> @lasx_xvfrintrm_d(<4 x double> %va) nounwind {
91 ; CHECK-LABEL: lasx_xvfrintrm_d:
92 ; CHECK: # %bb.0: # %entry
93 ; CHECK-NEXT: xvfrintrm.d $xr0, $xr0
96 %res = call <4 x double> @llvm.loongarch.lasx.xvfrintrm.d(<4 x double> %va)
100 declare <8 x float> @llvm.loongarch.lasx.xvfrint.s(<8 x float>)
102 define <8 x float> @lasx_xvfrint_s(<8 x float> %va) nounwind {
103 ; CHECK-LABEL: lasx_xvfrint_s:
104 ; CHECK: # %bb.0: # %entry
105 ; CHECK-NEXT: xvfrint.s $xr0, $xr0
108 %res = call <8 x float> @llvm.loongarch.lasx.xvfrint.s(<8 x float> %va)
112 declare <4 x double> @llvm.loongarch.lasx.xvfrint.d(<4 x double>)
114 define <4 x double> @lasx_xvfrint_d(<4 x double> %va) nounwind {
115 ; CHECK-LABEL: lasx_xvfrint_d:
116 ; CHECK: # %bb.0: # %entry
117 ; CHECK-NEXT: xvfrint.d $xr0, $xr0
120 %res = call <4 x double> @llvm.loongarch.lasx.xvfrint.d(<4 x double> %va)
121 ret <4 x double> %res