blob: bcd2affa7c621a4751753b5f264ee503f9fa2fe2 [file] [log] [blame]
Kevin P. Neal7f388122020-04-10 11:35:42 -05001// RUN: %clang_cc1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -flax-vector-conversions=none -emit-llvm -o - %s \
David Spickettaecd52b2020-11-06 10:59:16 +00002// RUN: | FileCheck --check-prefix=COMMON --check-prefix=UNCONSTRAINED %s
Kevin P. Neald4ce8622020-07-10 08:46:09 -04003// RUN: %clang_cc1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -flax-vector-conversions=none -fexperimental-strict-floating-point -ffp-exception-behavior=strict -emit-llvm -o - %s \
David Spickettaecd52b2020-11-06 10:59:16 +00004// RUN: | FileCheck --check-prefix=COMMON --check-prefix=CONSTRAINED %s
Kevin P. Neal7f388122020-04-10 11:35:42 -05005// RUN: %clang_cc1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -flax-vector-conversions=none -emit-llvm -o - %s | llc -o=- - \
6// RUN: | FileCheck --check-prefix=COMMON --check-prefix=CHECK-ASM %s
Kevin P. Neald4ce8622020-07-10 08:46:09 -04007// RUN: %clang_cc1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -flax-vector-conversions=none -fexperimental-strict-floating-point -ffp-exception-behavior=strict -emit-llvm -o - %s | llc -o=- - \
Kevin P. Neal7f388122020-04-10 11:35:42 -05008// RUN: | FileCheck --check-prefix=COMMON --check-prefix=CHECK-ASM %s
9
10// REQUIRES: aarch64-registered-target
11
Kevin P. Neal7f388122020-04-10 11:35:42 -050012#include <arm_neon.h>
13
14float64x2_t rnd5(float64x2_t a) { return vrndq_f64(a); }
15// COMMON-LABEL: rnd5
16// UNCONSTRAINED: call <2 x double> @llvm.trunc.v2f64(<2 x double>
17// CONSTRAINED: call <2 x double> @llvm.experimental.constrained.trunc.v2f64(<2 x double>
18// CHECK-ASM: frintz.2d v{{[0-9]+}}, v{{[0-9]+}}
19
20float64x2_t rnd13(float64x2_t a) { return vrndmq_f64(a); }
21// COMMON-LABEL: rnd13
22// UNCONSTRAINED: call <2 x double> @llvm.floor.v2f64(<2 x double>
23// CONSTRAINED: call <2 x double> @llvm.experimental.constrained.floor.v2f64(<2 x double>
24// CHECK-ASM: frintm.2d v{{[0-9]+}}, v{{[0-9]+}}
25
26float64x2_t rnd18(float64x2_t a) { return vrndpq_f64(a); }
27// COMMON-LABEL: rnd18
28// UNCONSTRAINED: call <2 x double> @llvm.ceil.v2f64(<2 x double>
29// CONSTRAINED: call <2 x double> @llvm.experimental.constrained.ceil.v2f64(<2 x double>
30// CHECK-ASM: frintp.2d v{{[0-9]+}}, v{{[0-9]+}}
31
32float64x2_t rnd22(float64x2_t a) { return vrndaq_f64(a); }
33// COMMON-LABEL: rnd22
34// UNCONSTRAINED: call <2 x double> @llvm.round.v2f64(<2 x double>
35// CONSTRAINED: call <2 x double> @llvm.experimental.constrained.round.v2f64(<2 x double>
36// CHECK-ASM: frinta.2d v{{[0-9]+}}, v{{[0-9]+}}
37
38float64x2_t rnd25(float64x2_t a) { return vrndxq_f64(a); }
39// COMMON-LABEL: rnd25
40// UNCONSTRAINED: call <2 x double> @llvm.rint.v2f64(<2 x double>
41// CONSTRAINED: call <2 x double> @llvm.experimental.constrained.rint.v2f64(<2 x double>
42// CHECK-ASM: frintx.2d v{{[0-9]+}}, v{{[0-9]+}}
43