; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --extra_scrub ; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve < %s | FileCheck %s ; FCEIL define @frintp_nxv8f16( %a) { ; CHECK-LABEL: frintp_nxv8f16: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.h ; CHECK-NEXT: frintp z0.h, p0/m, z0.h ; CHECK-NEXT: ret %res = call @llvm.ceil.nxv8f16( %a) ret %res } define @frintp_nxv4f16( %a) { ; CHECK-LABEL: frintp_nxv4f16: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.s ; CHECK-NEXT: frintp z0.h, p0/m, z0.h ; CHECK-NEXT: ret %res = call @llvm.ceil.nxv4f16( %a) ret %res } define @frintp_nxv2f16( %a) { ; CHECK-LABEL: frintp_nxv2f16: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.d ; CHECK-NEXT: frintp z0.h, p0/m, z0.h ; CHECK-NEXT: ret %res = call @llvm.ceil.nxv2f16( %a) ret %res } define @frintp_nxv4f32( %a) { ; CHECK-LABEL: frintp_nxv4f32: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.s ; CHECK-NEXT: frintp z0.s, p0/m, z0.s ; CHECK-NEXT: ret %res = call @llvm.ceil.nxv4f32( %a) ret %res } define @frintp_nxv2f32( %a) { ; CHECK-LABEL: frintp_nxv2f32: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.d ; CHECK-NEXT: frintp z0.s, p0/m, z0.s ; CHECK-NEXT: ret %res = call @llvm.ceil.nxv2f32( %a) ret %res } define @frintp_nxv2f64( %a) { ; CHECK-LABEL: frintp_nxv2f64: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.d ; CHECK-NEXT: frintp z0.d, p0/m, z0.d ; CHECK-NEXT: ret %res = call @llvm.ceil.nxv2f64( %a) ret %res } ; FFLOOR define @frintm_nxv8f16( %a) { ; CHECK-LABEL: frintm_nxv8f16: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.h ; CHECK-NEXT: frintm z0.h, p0/m, z0.h ; CHECK-NEXT: ret %res = call @llvm.floor.nxv8f16( %a) ret %res } define @frintm_nxv4f16( %a) { ; CHECK-LABEL: frintm_nxv4f16: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.s ; CHECK-NEXT: frintm z0.h, p0/m, z0.h ; CHECK-NEXT: ret %res = call @llvm.floor.nxv4f16( %a) ret %res } define @frintm_nxv2f16( %a) { ; CHECK-LABEL: frintm_nxv2f16: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.d ; CHECK-NEXT: frintm z0.h, p0/m, z0.h ; CHECK-NEXT: ret %res = call @llvm.floor.nxv2f16( %a) ret %res } define @frintm_nxv4f32( %a) { ; CHECK-LABEL: frintm_nxv4f32: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.s ; CHECK-NEXT: frintm z0.s, p0/m, z0.s ; CHECK-NEXT: ret %res = call @llvm.floor.nxv4f32( %a) ret %res } define @frintm_nxv2f32( %a) { ; CHECK-LABEL: frintm_nxv2f32: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.d ; CHECK-NEXT: frintm z0.s, p0/m, z0.s ; CHECK-NEXT: ret %res = call @llvm.floor.nxv2f32( %a) ret %res } define @frintm_nxv2f64( %a) { ; CHECK-LABEL: frintm_nxv2f64: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.d ; CHECK-NEXT: frintm z0.d, p0/m, z0.d ; CHECK-NEXT: ret %res = call @llvm.floor.nxv2f64( %a) ret %res } ; FNEARBYINT define @frinti_nxv8f16( %a) { ; CHECK-LABEL: frinti_nxv8f16: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.h ; CHECK-NEXT: frinti z0.h, p0/m, z0.h ; CHECK-NEXT: ret %res = call @llvm.nearbyint.nxv8f16( %a) ret %res } define @frinti_nxv4f16( %a) { ; CHECK-LABEL: frinti_nxv4f16: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.s ; CHECK-NEXT: frinti z0.h, p0/m, z0.h ; CHECK-NEXT: ret %res = call @llvm.nearbyint.nxv4f16( %a) ret %res } define @frinti_nxv2f16( %a) { ; CHECK-LABEL: frinti_nxv2f16: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.d ; CHECK-NEXT: frinti z0.h, p0/m, z0.h ; CHECK-NEXT: ret %res = call @llvm.nearbyint.nxv2f16( %a) ret %res } define @frinti_nxv4f32( %a) { ; CHECK-LABEL: frinti_nxv4f32: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.s ; CHECK-NEXT: frinti z0.s, p0/m, z0.s ; CHECK-NEXT: ret %res = call @llvm.nearbyint.nxv4f32( %a) ret %res } define @frinti_nxv2f32( %a) { ; CHECK-LABEL: frinti_nxv2f32: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.d ; CHECK-NEXT: frinti z0.s, p0/m, z0.s ; CHECK-NEXT: ret %res = call @llvm.nearbyint.nxv2f32( %a) ret %res } define @frinti_nxv2f64( %a) { ; CHECK-LABEL: frinti_nxv2f64: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.d ; CHECK-NEXT: frinti z0.d, p0/m, z0.d ; CHECK-NEXT: ret %res = call @llvm.nearbyint.nxv2f64( %a) ret %res } ; FRINT define @frintx_nxv8f16( %a) { ; CHECK-LABEL: frintx_nxv8f16: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.h ; CHECK-NEXT: frintx z0.h, p0/m, z0.h ; CHECK-NEXT: ret %res = call @llvm.rint.nxv8f16( %a) ret %res } define @frintx_nxv4f16( %a) { ; CHECK-LABEL: frintx_nxv4f16: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.s ; CHECK-NEXT: frintx z0.h, p0/m, z0.h ; CHECK-NEXT: ret %res = call @llvm.rint.nxv4f16( %a) ret %res } define @frintx_nxv2f16( %a) { ; CHECK-LABEL: frintx_nxv2f16: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.d ; CHECK-NEXT: frintx z0.h, p0/m, z0.h ; CHECK-NEXT: ret %res = call @llvm.rint.nxv2f16( %a) ret %res } define @frintx_nxv4f32( %a) { ; CHECK-LABEL: frintx_nxv4f32: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.s ; CHECK-NEXT: frintx z0.s, p0/m, z0.s ; CHECK-NEXT: ret %res = call @llvm.rint.nxv4f32( %a) ret %res } define @frintx_nxv2f32( %a) { ; CHECK-LABEL: frintx_nxv2f32: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.d ; CHECK-NEXT: frintx z0.s, p0/m, z0.s ; CHECK-NEXT: ret %res = call @llvm.rint.nxv2f32( %a) ret %res } define @frintx_nxv2f64( %a) { ; CHECK-LABEL: frintx_nxv2f64: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.d ; CHECK-NEXT: frintx z0.d, p0/m, z0.d ; CHECK-NEXT: ret %res = call @llvm.rint.nxv2f64( %a) ret %res } ; ROUND define @frinta_nxv8f16( %a) { ; CHECK-LABEL: frinta_nxv8f16: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.h ; CHECK-NEXT: frinta z0.h, p0/m, z0.h ; CHECK-NEXT: ret %res = call @llvm.round.nxv8f16( %a) ret %res } define @frinta_nxv4f16( %a) { ; CHECK-LABEL: frinta_nxv4f16: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.s ; CHECK-NEXT: frinta z0.h, p0/m, z0.h ; CHECK-NEXT: ret %res = call @llvm.round.nxv4f16( %a) ret %res } define @frinta_nxv2f16( %a) { ; CHECK-LABEL: frinta_nxv2f16: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.d ; CHECK-NEXT: frinta z0.h, p0/m, z0.h ; CHECK-NEXT: ret %res = call @llvm.round.nxv2f16( %a) ret %res } define @frinta_nxv4f32( %a) { ; CHECK-LABEL: frinta_nxv4f32: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.s ; CHECK-NEXT: frinta z0.s, p0/m, z0.s ; CHECK-NEXT: ret %res = call @llvm.round.nxv4f32( %a) ret %res } define @frinta_nxv2f32( %a) { ; CHECK-LABEL: frinta_nxv2f32: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.d ; CHECK-NEXT: frinta z0.s, p0/m, z0.s ; CHECK-NEXT: ret %res = call @llvm.round.nxv2f32( %a) ret %res } define @frinta_nxv2f64( %a) { ; CHECK-LABEL: frinta_nxv2f64: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.d ; CHECK-NEXT: frinta z0.d, p0/m, z0.d ; CHECK-NEXT: ret %res = call @llvm.round.nxv2f64( %a) ret %res } ; ROUNDEVEN define @frintn_nxv8f16( %a) { ; CHECK-LABEL: frintn_nxv8f16: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.h ; CHECK-NEXT: frintn z0.h, p0/m, z0.h ; CHECK-NEXT: ret %res = call @llvm.roundeven.nxv8f16( %a) ret %res } define @frintn_nxv4f16( %a) { ; CHECK-LABEL: frintn_nxv4f16: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.s ; CHECK-NEXT: frintn z0.h, p0/m, z0.h ; CHECK-NEXT: ret %res = call @llvm.roundeven.nxv4f16( %a) ret %res } define @frintn_nxv2f16( %a) { ; CHECK-LABEL: frintn_nxv2f16: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.d ; CHECK-NEXT: frintn z0.h, p0/m, z0.h ; CHECK-NEXT: ret %res = call @llvm.roundeven.nxv2f16( %a) ret %res } define @frintn_nxv4f32( %a) { ; CHECK-LABEL: frintn_nxv4f32: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.s ; CHECK-NEXT: frintn z0.s, p0/m, z0.s ; CHECK-NEXT: ret %res = call @llvm.roundeven.nxv4f32( %a) ret %res } define @frintn_nxv2f32( %a) { ; CHECK-LABEL: frintn_nxv2f32: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.d ; CHECK-NEXT: frintn z0.s, p0/m, z0.s ; CHECK-NEXT: ret %res = call @llvm.roundeven.nxv2f32( %a) ret %res } define @frintn_nxv2f64( %a) { ; CHECK-LABEL: frintn_nxv2f64: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.d ; CHECK-NEXT: frintn z0.d, p0/m, z0.d ; CHECK-NEXT: ret %res = call @llvm.roundeven.nxv2f64( %a) ret %res } ; FTRUNC define @frintz_nxv8f16( %a) { ; CHECK-LABEL: frintz_nxv8f16: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.h ; CHECK-NEXT: frintz z0.h, p0/m, z0.h ; CHECK-NEXT: ret %res = call @llvm.trunc.nxv8f16( %a) ret %res } define @frintz_nxv4f16( %a) { ; CHECK-LABEL: frintz_nxv4f16: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.s ; CHECK-NEXT: frintz z0.h, p0/m, z0.h ; CHECK-NEXT: ret %res = call @llvm.trunc.nxv4f16( %a) ret %res } define @frintz_nxv2f16( %a) { ; CHECK-LABEL: frintz_nxv2f16: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.d ; CHECK-NEXT: frintz z0.h, p0/m, z0.h ; CHECK-NEXT: ret %res = call @llvm.trunc.nxv2f16( %a) ret %res } define @frintz_nxv4f32( %a) { ; CHECK-LABEL: frintz_nxv4f32: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.s ; CHECK-NEXT: frintz z0.s, p0/m, z0.s ; CHECK-NEXT: ret %res = call @llvm.trunc.nxv4f32( %a) ret %res } define @frintz_nxv2f32( %a) { ; CHECK-LABEL: frintz_nxv2f32: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.d ; CHECK-NEXT: frintz z0.s, p0/m, z0.s ; CHECK-NEXT: ret %res = call @llvm.trunc.nxv2f32( %a) ret %res } define @frintz_nxv2f64( %a) { ; CHECK-LABEL: frintz_nxv2f64: ; CHECK: // %bb.0: ; CHECK-NEXT: ptrue p0.d ; CHECK-NEXT: frintz z0.d, p0/m, z0.d ; CHECK-NEXT: ret %res = call @llvm.trunc.nxv2f64( %a) ret %res } declare @llvm.ceil.nxv8f16( ) declare @llvm.ceil.nxv4f16( ) declare @llvm.ceil.nxv2f16( ) declare @llvm.ceil.nxv4f32() declare @llvm.ceil.nxv2f32() declare @llvm.ceil.nxv2f64() declare @llvm.floor.nxv8f16( ) declare @llvm.floor.nxv4f16( ) declare @llvm.floor.nxv2f16( ) declare @llvm.floor.nxv4f32() declare @llvm.floor.nxv2f32() declare @llvm.floor.nxv2f64() declare @llvm.nearbyint.nxv8f16( ) declare @llvm.nearbyint.nxv4f16( ) declare @llvm.nearbyint.nxv2f16( ) declare @llvm.nearbyint.nxv4f32() declare @llvm.nearbyint.nxv2f32() declare @llvm.nearbyint.nxv2f64() declare @llvm.rint.nxv8f16( ) declare @llvm.rint.nxv4f16( ) declare @llvm.rint.nxv2f16( ) declare @llvm.rint.nxv4f32() declare @llvm.rint.nxv2f32() declare @llvm.rint.nxv2f64() declare @llvm.round.nxv8f16( ) declare @llvm.round.nxv4f16( ) declare @llvm.round.nxv2f16( ) declare @llvm.round.nxv4f32() declare @llvm.round.nxv2f32() declare @llvm.round.nxv2f64() declare @llvm.roundeven.nxv8f16( ) declare @llvm.roundeven.nxv4f16( ) declare @llvm.roundeven.nxv2f16( ) declare @llvm.roundeven.nxv4f32() declare @llvm.roundeven.nxv2f32() declare @llvm.roundeven.nxv2f64() declare @llvm.trunc.nxv8f16( ) declare @llvm.trunc.nxv4f16( ) declare @llvm.trunc.nxv2f16( ) declare @llvm.trunc.nxv4f32() declare @llvm.trunc.nxv2f32() declare @llvm.trunc.nxv2f64()