108 lines · c
1// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 52// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon -target-feature +faminmax -O3 -emit-llvm -o - %s | FileCheck %s3// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon -target-feature +faminmax -S -O3 -Werror -Wall -o /dev/null %s4 5// REQUIRES: aarch64-registered-target6 7#include <arm_neon.h>8 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]]14//15float16x4_t test_vamin_f16(float16x4_t vn, float16x4_t vm) {16 return vamin_f16(vn, vm);17}18 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]]24//25float16x8_t test_vaminq_f16(float16x8_t vn, float16x8_t vm) {26 return vaminq_f16(vn, vm);27}28 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]]34//35float32x2_t test_vamin_f32(float32x2_t vn, float32x2_t vm) {36 return vamin_f32(vn, vm);37}38 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]]44//45float32x4_t test_vaminq_f32(float32x4_t vn, float32x4_t vm) {46 return vaminq_f32(vn, vm);47}48 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]]54//55float64x2_t test_vaminq_f64(float64x2_t vn, float64x2_t vm) {56 return vaminq_f64(vn, vm);57}58 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]]64//65float16x4_t test_vamax_f16(float16x4_t vn, float16x4_t vm) {66 return vamax_f16(vn, vm);67}68 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]]74//75float16x8_t test_vamaxq_f16(float16x8_t vn, float16x8_t vm) {76 return vamaxq_f16(vn, vm);77}78 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]]84//85float32x2_t test_vamax_f32(float32x2_t vn, float32x2_t vm) {86 return vamax_f32(vn, vm);87}88 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]]94//95float32x4_t test_vamaxq_f32(float32x4_t vn, float32x4_t vm) {96 return vamaxq_f32(vn, vm);97}98 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]]104//105float64x2_t test_vamaxq_f64(float64x2_t vn, float64x2_t vm) {106 return vamaxq_f64(vn, vm);107}108