124 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc --mtriple=loongarch32 --mattr=+32s,+lasx < %s | FileCheck %s3; RUN: llc --mtriple=loongarch64 --mattr=+lasx < %s | FileCheck %s4 5declare <8 x float> @llvm.loongarch.lasx.xvfrintrne.s(<8 x float>)6 7define <8 x float> @lasx_xvfrintrne_s(<8 x float> %va) nounwind {8; CHECK-LABEL: lasx_xvfrintrne_s:9; CHECK: # %bb.0: # %entry10; CHECK-NEXT: xvfrintrne.s $xr0, $xr011; CHECK-NEXT: ret12entry:13 %res = call <8 x float> @llvm.loongarch.lasx.xvfrintrne.s(<8 x float> %va)14 ret <8 x float> %res15}16 17declare <4 x double> @llvm.loongarch.lasx.xvfrintrne.d(<4 x double>)18 19define <4 x double> @lasx_xvfrintrne_d(<4 x double> %va) nounwind {20; CHECK-LABEL: lasx_xvfrintrne_d:21; CHECK: # %bb.0: # %entry22; CHECK-NEXT: xvfrintrne.d $xr0, $xr023; CHECK-NEXT: ret24entry:25 %res = call <4 x double> @llvm.loongarch.lasx.xvfrintrne.d(<4 x double> %va)26 ret <4 x double> %res27}28 29declare <8 x float> @llvm.loongarch.lasx.xvfrintrz.s(<8 x float>)30 31define <8 x float> @lasx_xvfrintrz_s(<8 x float> %va) nounwind {32; CHECK-LABEL: lasx_xvfrintrz_s:33; CHECK: # %bb.0: # %entry34; CHECK-NEXT: xvfrintrz.s $xr0, $xr035; CHECK-NEXT: ret36entry:37 %res = call <8 x float> @llvm.loongarch.lasx.xvfrintrz.s(<8 x float> %va)38 ret <8 x float> %res39}40 41declare <4 x double> @llvm.loongarch.lasx.xvfrintrz.d(<4 x double>)42 43define <4 x double> @lasx_xvfrintrz_d(<4 x double> %va) nounwind {44; CHECK-LABEL: lasx_xvfrintrz_d:45; CHECK: # %bb.0: # %entry46; CHECK-NEXT: xvfrintrz.d $xr0, $xr047; CHECK-NEXT: ret48entry:49 %res = call <4 x double> @llvm.loongarch.lasx.xvfrintrz.d(<4 x double> %va)50 ret <4 x double> %res51}52 53declare <8 x float> @llvm.loongarch.lasx.xvfrintrp.s(<8 x float>)54 55define <8 x float> @lasx_xvfrintrp_s(<8 x float> %va) nounwind {56; CHECK-LABEL: lasx_xvfrintrp_s:57; CHECK: # %bb.0: # %entry58; CHECK-NEXT: xvfrintrp.s $xr0, $xr059; CHECK-NEXT: ret60entry:61 %res = call <8 x float> @llvm.loongarch.lasx.xvfrintrp.s(<8 x float> %va)62 ret <8 x float> %res63}64 65declare <4 x double> @llvm.loongarch.lasx.xvfrintrp.d(<4 x double>)66 67define <4 x double> @lasx_xvfrintrp_d(<4 x double> %va) nounwind {68; CHECK-LABEL: lasx_xvfrintrp_d:69; CHECK: # %bb.0: # %entry70; CHECK-NEXT: xvfrintrp.d $xr0, $xr071; CHECK-NEXT: ret72entry:73 %res = call <4 x double> @llvm.loongarch.lasx.xvfrintrp.d(<4 x double> %va)74 ret <4 x double> %res75}76 77declare <8 x float> @llvm.loongarch.lasx.xvfrintrm.s(<8 x float>)78 79define <8 x float> @lasx_xvfrintrm_s(<8 x float> %va) nounwind {80; CHECK-LABEL: lasx_xvfrintrm_s:81; CHECK: # %bb.0: # %entry82; CHECK-NEXT: xvfrintrm.s $xr0, $xr083; CHECK-NEXT: ret84entry:85 %res = call <8 x float> @llvm.loongarch.lasx.xvfrintrm.s(<8 x float> %va)86 ret <8 x float> %res87}88 89declare <4 x double> @llvm.loongarch.lasx.xvfrintrm.d(<4 x double>)90 91define <4 x double> @lasx_xvfrintrm_d(<4 x double> %va) nounwind {92; CHECK-LABEL: lasx_xvfrintrm_d:93; CHECK: # %bb.0: # %entry94; CHECK-NEXT: xvfrintrm.d $xr0, $xr095; CHECK-NEXT: ret96entry:97 %res = call <4 x double> @llvm.loongarch.lasx.xvfrintrm.d(<4 x double> %va)98 ret <4 x double> %res99}100 101declare <8 x float> @llvm.loongarch.lasx.xvfrint.s(<8 x float>)102 103define <8 x float> @lasx_xvfrint_s(<8 x float> %va) nounwind {104; CHECK-LABEL: lasx_xvfrint_s:105; CHECK: # %bb.0: # %entry106; CHECK-NEXT: xvfrint.s $xr0, $xr0107; CHECK-NEXT: ret108entry:109 %res = call <8 x float> @llvm.loongarch.lasx.xvfrint.s(<8 x float> %va)110 ret <8 x float> %res111}112 113declare <4 x double> @llvm.loongarch.lasx.xvfrint.d(<4 x double>)114 115define <4 x double> @lasx_xvfrint_d(<4 x double> %va) nounwind {116; CHECK-LABEL: lasx_xvfrint_d:117; CHECK: # %bb.0: # %entry118; CHECK-NEXT: xvfrint.d $xr0, $xr0119; CHECK-NEXT: ret120entry:121 %res = call <4 x double> @llvm.loongarch.lasx.xvfrint.d(<4 x double> %va)122 ret <4 x double> %res123}124