Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / CodeGen / AArch64 / neon-faminmax-intrinsics.c
blob3ae98b5723d7c84a087c0eb5fd1f0f908318945b
1 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5
2 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon -target-feature +faminmax -O3 -emit-llvm -o - %s | FileCheck %s
3 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon -target-feature +faminmax -S -O3 -Werror -Wall -o /dev/null %s
5 // REQUIRES: aarch64-registered-target
7 #include <arm_neon.h>
9 // CHECK-LABEL: define dso_local <4 x half> @test_vamin_f16(
10 // CHECK-SAME: <4 x half> noundef [[VN:%.*]], <4 x half> noundef [[VM:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] {
11 // CHECK-NEXT: [[ENTRY:.*:]]
12 // CHECK-NEXT: [[FAMIN2_I:%.*]] = tail call <4 x half> @llvm.aarch64.neon.famin.v4f16(<4 x half> [[VN]], <4 x half> [[VM]])
13 // CHECK-NEXT: ret <4 x half> [[FAMIN2_I]]
15 float16x4_t test_vamin_f16(float16x4_t vn, float16x4_t vm) {
16 return vamin_f16(vn, vm);
19 // CHECK-LABEL: define dso_local <8 x half> @test_vaminq_f16(
20 // CHECK-SAME: <8 x half> noundef [[VN:%.*]], <8 x half> noundef [[VM:%.*]]) local_unnamed_addr #[[ATTR0]] {
21 // CHECK-NEXT: [[ENTRY:.*:]]
22 // CHECK-NEXT: [[FAMIN2_I:%.*]] = tail call <8 x half> @llvm.aarch64.neon.famin.v8f16(<8 x half> [[VN]], <8 x half> [[VM]])
23 // CHECK-NEXT: ret <8 x half> [[FAMIN2_I]]
25 float16x8_t test_vaminq_f16(float16x8_t vn, float16x8_t vm) {
26 return vaminq_f16(vn, vm);
29 // CHECK-LABEL: define dso_local <2 x float> @test_vamin_f32(
30 // CHECK-SAME: <2 x float> noundef [[VN:%.*]], <2 x float> noundef [[VM:%.*]]) local_unnamed_addr #[[ATTR0]] {
31 // CHECK-NEXT: [[ENTRY:.*:]]
32 // CHECK-NEXT: [[FAMIN2_I:%.*]] = tail call <2 x float> @llvm.aarch64.neon.famin.v2f32(<2 x float> [[VN]], <2 x float> [[VM]])
33 // CHECK-NEXT: ret <2 x float> [[FAMIN2_I]]
35 float32x2_t test_vamin_f32(float32x2_t vn, float32x2_t vm) {
36 return vamin_f32(vn, vm);
39 // CHECK-LABEL: define dso_local <4 x float> @test_vaminq_f32(
40 // CHECK-SAME: <4 x float> noundef [[VN:%.*]], <4 x float> noundef [[VM:%.*]]) local_unnamed_addr #[[ATTR0]] {
41 // CHECK-NEXT: [[ENTRY:.*:]]
42 // CHECK-NEXT: [[FAMIN2_I:%.*]] = tail call <4 x float> @llvm.aarch64.neon.famin.v4f32(<4 x float> [[VN]], <4 x float> [[VM]])
43 // CHECK-NEXT: ret <4 x float> [[FAMIN2_I]]
45 float32x4_t test_vaminq_f32(float32x4_t vn, float32x4_t vm) {
46 return vaminq_f32(vn, vm);
49 // CHECK-LABEL: define dso_local <2 x double> @test_vaminq_f64(
50 // CHECK-SAME: <2 x double> noundef [[VN:%.*]], <2 x double> noundef [[VM:%.*]]) local_unnamed_addr #[[ATTR0]] {
51 // CHECK-NEXT: [[ENTRY:.*:]]
52 // CHECK-NEXT: [[FAMIN2_I:%.*]] = tail call <2 x double> @llvm.aarch64.neon.famin.v2f64(<2 x double> [[VN]], <2 x double> [[VM]])
53 // CHECK-NEXT: ret <2 x double> [[FAMIN2_I]]
55 float64x2_t test_vaminq_f64(float64x2_t vn, float64x2_t vm) {
56 return vaminq_f64(vn, vm);
59 // CHECK-LABEL: define dso_local <4 x half> @test_vamax_f16(
60 // CHECK-SAME: <4 x half> noundef [[VN:%.*]], <4 x half> noundef [[VM:%.*]]) local_unnamed_addr #[[ATTR0]] {
61 // CHECK-NEXT: [[ENTRY:.*:]]
62 // CHECK-NEXT: [[FAMAX2_I:%.*]] = tail call <4 x half> @llvm.aarch64.neon.famax.v4f16(<4 x half> [[VN]], <4 x half> [[VM]])
63 // CHECK-NEXT: ret <4 x half> [[FAMAX2_I]]
65 float16x4_t test_vamax_f16(float16x4_t vn, float16x4_t vm) {
66 return vamax_f16(vn, vm);
69 // CHECK-LABEL: define dso_local <8 x half> @test_vamaxq_f16(
70 // CHECK-SAME: <8 x half> noundef [[VN:%.*]], <8 x half> noundef [[VM:%.*]]) local_unnamed_addr #[[ATTR0]] {
71 // CHECK-NEXT: [[ENTRY:.*:]]
72 // CHECK-NEXT: [[FAMAX2_I:%.*]] = tail call <8 x half> @llvm.aarch64.neon.famax.v8f16(<8 x half> [[VN]], <8 x half> [[VM]])
73 // CHECK-NEXT: ret <8 x half> [[FAMAX2_I]]
75 float16x8_t test_vamaxq_f16(float16x8_t vn, float16x8_t vm) {
76 return vamaxq_f16(vn, vm);
79 // CHECK-LABEL: define dso_local <2 x float> @test_vamax_f32(
80 // CHECK-SAME: <2 x float> noundef [[VN:%.*]], <2 x float> noundef [[VM:%.*]]) local_unnamed_addr #[[ATTR0]] {
81 // CHECK-NEXT: [[ENTRY:.*:]]
82 // CHECK-NEXT: [[FAMAX2_I:%.*]] = tail call <2 x float> @llvm.aarch64.neon.famax.v2f32(<2 x float> [[VN]], <2 x float> [[VM]])
83 // CHECK-NEXT: ret <2 x float> [[FAMAX2_I]]
85 float32x2_t test_vamax_f32(float32x2_t vn, float32x2_t vm) {
86 return vamax_f32(vn, vm);
89 // CHECK-LABEL: define dso_local <4 x float> @test_vamaxq_f32(
90 // CHECK-SAME: <4 x float> noundef [[VN:%.*]], <4 x float> noundef [[VM:%.*]]) local_unnamed_addr #[[ATTR0]] {
91 // CHECK-NEXT: [[ENTRY:.*:]]
92 // CHECK-NEXT: [[FAMAX2_I:%.*]] = tail call <4 x float> @llvm.aarch64.neon.famax.v4f32(<4 x float> [[VN]], <4 x float> [[VM]])
93 // CHECK-NEXT: ret <4 x float> [[FAMAX2_I]]
95 float32x4_t test_vamaxq_f32(float32x4_t vn, float32x4_t vm) {
96 return vamaxq_f32(vn, vm);
99 // CHECK-LABEL: define dso_local <2 x double> @test_vamaxq_f64(
100 // CHECK-SAME: <2 x double> noundef [[VN:%.*]], <2 x double> noundef [[VM:%.*]]) local_unnamed_addr #[[ATTR0]] {
101 // CHECK-NEXT: [[ENTRY:.*:]]
102 // CHECK-NEXT: [[FAMAX2_I:%.*]] = tail call <2 x double> @llvm.aarch64.neon.famax.v2f64(<2 x double> [[VN]], <2 x double> [[VM]])
103 // CHECK-NEXT: ret <2 x double> [[FAMAX2_I]]
105 float64x2_t test_vamaxq_f64(float64x2_t vn, float64x2_t vm) {
106 return vamaxq_f64(vn, vm);