1*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -emit-llvm -o - %s | FileCheck %s 2*0a6a1f1dSLionel Sambuc 3*0a6a1f1dSLionel Sambuc #include <arm_neon.h> 4*0a6a1f1dSLionel Sambuc rnd1(float32x2_t a)5*0a6a1f1dSLionel Sambucint32x2_t rnd1(float32x2_t a) { return vrnd_f32(a); } 6*0a6a1f1dSLionel Sambuc // CHECK: call <2 x float> @llvm.trunc.v2f32(<2 x float> rnd3(float32x4_t a)7*0a6a1f1dSLionel Sambucint32x4_t rnd3(float32x4_t a) { return vrndq_f32(a); } 8*0a6a1f1dSLionel Sambuc // CHECK: call <4 x float> @llvm.trunc.v4f32(<4 x float> rnd5(float64x2_t a)9*0a6a1f1dSLionel Sambucint64x2_t rnd5(float64x2_t a) { return vrndq_f64(a); } 10*0a6a1f1dSLionel Sambuc // CHECK: call <2 x double> @llvm.trunc.v2f64(<2 x double> 11*0a6a1f1dSLionel Sambuc 12*0a6a1f1dSLionel Sambuc rnd7(float32x2_t a)13*0a6a1f1dSLionel Sambucint32x2_t rnd7(float32x2_t a) { return vrndn_f32(a); } 14*0a6a1f1dSLionel Sambuc // CHECK: call <2 x float> @llvm.aarch64.neon.frintn.v2f32(<2 x float> rnd8(float32x4_t a)15*0a6a1f1dSLionel Sambucint32x4_t rnd8(float32x4_t a) { return vrndnq_f32(a); } 16*0a6a1f1dSLionel Sambuc // CHECK: call <4 x float> @llvm.aarch64.neon.frintn.v4f32(<4 x float> rnd9(float64x2_t a)17*0a6a1f1dSLionel Sambucint64x2_t rnd9(float64x2_t a) { return vrndnq_f64(a); } 18*0a6a1f1dSLionel Sambuc // CHECK: call <2 x double> @llvm.aarch64.neon.frintn.v2f64(<2 x double> rnd10(float64x2_t a)19*0a6a1f1dSLionel Sambucint64x2_t rnd10(float64x2_t a) { return vrndnq_f64(a); } 20*0a6a1f1dSLionel Sambuc // CHECK: call <2 x double> @llvm.aarch64.neon.frintn.v2f64(<2 x double> 21*0a6a1f1dSLionel Sambuc rnd11(float32x2_t a)22*0a6a1f1dSLionel Sambucint32x2_t rnd11(float32x2_t a) { return vrndm_f32(a); } 23*0a6a1f1dSLionel Sambuc // CHECK: call <2 x float> @llvm.floor.v2f32(<2 x float> rnd12(float32x4_t a)24*0a6a1f1dSLionel Sambucint32x4_t rnd12(float32x4_t a) { return vrndmq_f32(a); } 25*0a6a1f1dSLionel Sambuc // CHECK: call <4 x float> @llvm.floor.v4f32(<4 x float> rnd13(float64x2_t a)26*0a6a1f1dSLionel Sambucint64x2_t rnd13(float64x2_t a) { return vrndmq_f64(a); } 27*0a6a1f1dSLionel Sambuc // CHECK: call <2 x double> @llvm.floor.v2f64(<2 x double> rnd14(float64x2_t a)28*0a6a1f1dSLionel Sambucint64x2_t rnd14(float64x2_t a) { return vrndmq_f64(a); } 29*0a6a1f1dSLionel Sambuc // CHECK: call <2 x double> @llvm.floor.v2f64(<2 x double> 30*0a6a1f1dSLionel Sambuc rnd15(float32x2_t a)31*0a6a1f1dSLionel Sambucint32x2_t rnd15(float32x2_t a) { return vrndp_f32(a); } 32*0a6a1f1dSLionel Sambuc // CHECK: call <2 x float> @llvm.ceil.v2f32(<2 x float> rnd16(float32x4_t a)33*0a6a1f1dSLionel Sambucint32x4_t rnd16(float32x4_t a) { return vrndpq_f32(a); } 34*0a6a1f1dSLionel Sambuc // CHECK: call <4 x float> @llvm.ceil.v4f32(<4 x float> rnd18(float64x2_t a)35*0a6a1f1dSLionel Sambucint64x2_t rnd18(float64x2_t a) { return vrndpq_f64(a); } 36*0a6a1f1dSLionel Sambuc // CHECK: call <2 x double> @llvm.ceil.v2f64(<2 x double> 37*0a6a1f1dSLionel Sambuc rnd19(float32x2_t a)38*0a6a1f1dSLionel Sambucint32x2_t rnd19(float32x2_t a) { return vrnda_f32(a); } 39*0a6a1f1dSLionel Sambuc // CHECK: call <2 x float> @llvm.round.v2f32(<2 x float> rnd20(float32x4_t a)40*0a6a1f1dSLionel Sambucint32x4_t rnd20(float32x4_t a) { return vrndaq_f32(a); } 41*0a6a1f1dSLionel Sambuc // CHECK: call <4 x float> @llvm.round.v4f32(<4 x float> rnd22(float64x2_t a)42*0a6a1f1dSLionel Sambucint64x2_t rnd22(float64x2_t a) { return vrndaq_f64(a); } 43*0a6a1f1dSLionel Sambuc // CHECK: call <2 x double> @llvm.round.v2f64(<2 x double> 44*0a6a1f1dSLionel Sambuc rnd23(float32x2_t a)45*0a6a1f1dSLionel Sambucint32x2_t rnd23(float32x2_t a) { return vrndx_f32(a); } 46*0a6a1f1dSLionel Sambuc // CHECK: call <2 x float> @llvm.rint.v2f32(<2 x float> rnd24(float32x4_t a)47*0a6a1f1dSLionel Sambucint32x4_t rnd24(float32x4_t a) { return vrndxq_f32(a); } 48*0a6a1f1dSLionel Sambuc // CHECK: call <4 x float> @llvm.rint.v4f32(<4 x float> rnd25(float64x2_t a)49*0a6a1f1dSLionel Sambucint64x2_t rnd25(float64x2_t a) { return vrndxq_f64(a); } 50*0a6a1f1dSLionel Sambuc // CHECK: call <2 x double> @llvm.rint.v2f64(<2 x double> 51*0a6a1f1dSLionel Sambuc 52