// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -target-feature +sve2 -target-feature +faminmax -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme -target-feature +sme2 -target-feature +faminmax -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve -target-feature +sve2 -target-feature +faminmax -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s // RUN: %clang_cc1 -x c++ -triple aarch64-none-linux-gnu -target-feature +sve -target-feature +sve2 -target-feature +faminmax -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK-CPP // RUN: %clang_cc1 -x c++ -triple aarch64-none-linux-gnu -target-feature +sme -target-feature +sme2 -target-feature +faminmax -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK-CPP // RUN: %clang_cc1 -x c++ -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve -target-feature +sve2 -target-feature +faminmax -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK-CPP // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -target-feature +sve2 -target-feature +faminmax -S -disable-O0-optnone -Werror -Wall -o /dev/null %s // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme -target-feature +sme2 -target-feature +faminmax -S -disable-O0-optnone -Werror -Wall -o /dev/null %s // REQUIRES: aarch64-registered-target #ifdef __ARM_FEATURE_SME #include "arm_sme.h" #else #include "arm_sve.h" #endif #ifdef SVE_OVERLOADED_FORMS #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3) A1##A3 #else #define SVE_ACLE_FUNC(A1,A2,A3) A1##A2##A3 #endif #ifdef __ARM_FEATURE_SME #define STREAMING __arm_streaming #else #define STREAMING #endif // CHECK-LABEL: define dso_local @test_famin_f16_m( // CHECK-SAME: [[PG:%.*]], [[A:%.*]], [[B:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] { // CHECK-NEXT: [[ENTRY:.*:]] // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv8i1( [[PG]]) // CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.famin.nxv8f16( [[TMP0]], [[A]], [[B]]) // CHECK-NEXT: ret [[TMP1]] // // CHECK-CPP-LABEL: define dso_local @_Z16test_famin_f16_mu10__SVBool_tu13__SVFloat16_tS0_( // CHECK-CPP-SAME: [[PG:%.*]], [[A:%.*]], [[B:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] { // CHECK-CPP-NEXT: [[ENTRY:.*:]] // CHECK-CPP-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv8i1( [[PG]]) // CHECK-CPP-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.famin.nxv8f16( [[TMP0]], [[A]], [[B]]) // CHECK-CPP-NEXT: ret [[TMP1]] // svfloat16_t test_famin_f16_m(svbool_t pg, svfloat16_t a, svfloat16_t b) STREAMING { return SVE_ACLE_FUNC(svamin, _f16, _m)(pg, a, b); } // CHECK-LABEL: define dso_local @test_famin_f16_x( // CHECK-SAME: [[PG:%.*]], [[A:%.*]], [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-NEXT: [[ENTRY:.*:]] // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv8i1( [[PG]]) // CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.famin.u.nxv8f16( [[TMP0]], [[A]], [[B]]) // CHECK-NEXT: ret [[TMP1]] // // CHECK-CPP-LABEL: define dso_local @_Z16test_famin_f16_xu10__SVBool_tu13__SVFloat16_tS0_( // CHECK-CPP-SAME: [[PG:%.*]], [[A:%.*]], [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-CPP-NEXT: [[ENTRY:.*:]] // CHECK-CPP-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv8i1( [[PG]]) // CHECK-CPP-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.famin.u.nxv8f16( [[TMP0]], [[A]], [[B]]) // CHECK-CPP-NEXT: ret [[TMP1]] // svfloat16_t test_famin_f16_x(svbool_t pg, svfloat16_t a, svfloat16_t b) STREAMING { return SVE_ACLE_FUNC(svamin, _f16, _x)(pg, a, b); } // CHECK-LABEL: define dso_local @test_famin_f16_z( // CHECK-SAME: [[PG:%.*]], [[A:%.*]], [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-NEXT: [[ENTRY:.*:]] // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv8i1( [[PG]]) // CHECK-NEXT: [[TMP1:%.*]] = select [[TMP0]], [[A]], zeroinitializer // CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.famin.nxv8f16( [[TMP0]], [[TMP1]], [[B]]) // CHECK-NEXT: ret [[TMP2]] // // CHECK-CPP-LABEL: define dso_local @_Z16test_famin_f16_zu10__SVBool_tu13__SVFloat16_tS0_( // CHECK-CPP-SAME: [[PG:%.*]], [[A:%.*]], [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-CPP-NEXT: [[ENTRY:.*:]] // CHECK-CPP-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv8i1( [[PG]]) // CHECK-CPP-NEXT: [[TMP1:%.*]] = select [[TMP0]], [[A]], zeroinitializer // CHECK-CPP-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.famin.nxv8f16( [[TMP0]], [[TMP1]], [[B]]) // CHECK-CPP-NEXT: ret [[TMP2]] // svfloat16_t test_famin_f16_z(svbool_t pg, svfloat16_t a, svfloat16_t b) STREAMING { return SVE_ACLE_FUNC(svamin, _f16, _z)(pg, a, b); } // CHECK-LABEL: define dso_local @test_famin_n_f16_m( // CHECK-SAME: [[PG:%.*]], [[A:%.*]], half noundef [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-NEXT: [[ENTRY:.*:]] // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv8i1( [[PG]]) // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, half [[B]], i64 0 // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer // CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.famin.nxv8f16( [[TMP0]], [[A]], [[DOTSPLAT]]) // CHECK-NEXT: ret [[TMP1]] // // CHECK-CPP-LABEL: define dso_local @_Z18test_famin_n_f16_mu10__SVBool_tu13__SVFloat16_tDh( // CHECK-CPP-SAME: [[PG:%.*]], [[A:%.*]], half noundef [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-CPP-NEXT: [[ENTRY:.*:]] // CHECK-CPP-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv8i1( [[PG]]) // CHECK-CPP-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, half [[B]], i64 0 // CHECK-CPP-NEXT: [[DOTSPLAT:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer // CHECK-CPP-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.famin.nxv8f16( [[TMP0]], [[A]], [[DOTSPLAT]]) // CHECK-CPP-NEXT: ret [[TMP1]] // svfloat16_t test_famin_n_f16_m(svbool_t pg, svfloat16_t a, float16_t b) STREAMING { return SVE_ACLE_FUNC(svamin, _n_f16, _m)(pg, a, b); } // CHECK-LABEL: define dso_local @test_famin_n_f16_x( // CHECK-SAME: [[PG:%.*]], [[A:%.*]], half noundef [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-NEXT: [[ENTRY:.*:]] // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv8i1( [[PG]]) // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, half [[B]], i64 0 // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer // CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.famin.u.nxv8f16( [[TMP0]], [[A]], [[DOTSPLAT]]) // CHECK-NEXT: ret [[TMP1]] // // CHECK-CPP-LABEL: define dso_local @_Z18test_famin_n_f16_xu10__SVBool_tu13__SVFloat16_tDh( // CHECK-CPP-SAME: [[PG:%.*]], [[A:%.*]], half noundef [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-CPP-NEXT: [[ENTRY:.*:]] // CHECK-CPP-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv8i1( [[PG]]) // CHECK-CPP-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, half [[B]], i64 0 // CHECK-CPP-NEXT: [[DOTSPLAT:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer // CHECK-CPP-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.famin.u.nxv8f16( [[TMP0]], [[A]], [[DOTSPLAT]]) // CHECK-CPP-NEXT: ret [[TMP1]] // svfloat16_t test_famin_n_f16_x(svbool_t pg, svfloat16_t a, float16_t b) STREAMING { return SVE_ACLE_FUNC(svamin, _n_f16, _x)(pg, a, b); } // CHECK-LABEL: define dso_local @test_famin_n_f16_z( // CHECK-SAME: [[PG:%.*]], [[A:%.*]], half noundef [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-NEXT: [[ENTRY:.*:]] // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv8i1( [[PG]]) // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, half [[B]], i64 0 // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer // CHECK-NEXT: [[TMP1:%.*]] = select [[TMP0]], [[A]], zeroinitializer // CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.famin.nxv8f16( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CHECK-NEXT: ret [[TMP2]] // // CHECK-CPP-LABEL: define dso_local @_Z18test_famin_n_f16_zu10__SVBool_tu13__SVFloat16_tDh( // CHECK-CPP-SAME: [[PG:%.*]], [[A:%.*]], half noundef [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-CPP-NEXT: [[ENTRY:.*:]] // CHECK-CPP-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv8i1( [[PG]]) // CHECK-CPP-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, half [[B]], i64 0 // CHECK-CPP-NEXT: [[DOTSPLAT:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer // CHECK-CPP-NEXT: [[TMP1:%.*]] = select [[TMP0]], [[A]], zeroinitializer // CHECK-CPP-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.famin.nxv8f16( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CHECK-CPP-NEXT: ret [[TMP2]] // svfloat16_t test_famin_n_f16_z(svbool_t pg, svfloat16_t a, float16_t b) STREAMING { return SVE_ACLE_FUNC(svamin, _n_f16, _z)(pg, a, b); } // CHECK-LABEL: define dso_local @test_famin_f32_m( // CHECK-SAME: [[PG:%.*]], [[A:%.*]], [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-NEXT: [[ENTRY:.*:]] // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv4i1( [[PG]]) // CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.famin.nxv4f32( [[TMP0]], [[A]], [[B]]) // CHECK-NEXT: ret [[TMP1]] // // CHECK-CPP-LABEL: define dso_local @_Z16test_famin_f32_mu10__SVBool_tu13__SVFloat32_tS0_( // CHECK-CPP-SAME: [[PG:%.*]], [[A:%.*]], [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-CPP-NEXT: [[ENTRY:.*:]] // CHECK-CPP-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv4i1( [[PG]]) // CHECK-CPP-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.famin.nxv4f32( [[TMP0]], [[A]], [[B]]) // CHECK-CPP-NEXT: ret [[TMP1]] // svfloat32_t test_famin_f32_m(svbool_t pg, svfloat32_t a, svfloat32_t b) STREAMING { return SVE_ACLE_FUNC(svamin, _f32, _m)(pg, a, b); } // CHECK-LABEL: define dso_local @test_famin_f32_x( // CHECK-SAME: [[PG:%.*]], [[A:%.*]], [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-NEXT: [[ENTRY:.*:]] // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv4i1( [[PG]]) // CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.famin.u.nxv4f32( [[TMP0]], [[A]], [[B]]) // CHECK-NEXT: ret [[TMP1]] // // CHECK-CPP-LABEL: define dso_local @_Z16test_famin_f32_xu10__SVBool_tu13__SVFloat32_tS0_( // CHECK-CPP-SAME: [[PG:%.*]], [[A:%.*]], [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-CPP-NEXT: [[ENTRY:.*:]] // CHECK-CPP-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv4i1( [[PG]]) // CHECK-CPP-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.famin.u.nxv4f32( [[TMP0]], [[A]], [[B]]) // CHECK-CPP-NEXT: ret [[TMP1]] // svfloat32_t test_famin_f32_x(svbool_t pg, svfloat32_t a, svfloat32_t b) STREAMING { return SVE_ACLE_FUNC(svamin, _f32, _x)(pg, a, b); } // CHECK-LABEL: define dso_local @test_famin_f32_z( // CHECK-SAME: [[PG:%.*]], [[A:%.*]], [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-NEXT: [[ENTRY:.*:]] // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv4i1( [[PG]]) // CHECK-NEXT: [[TMP1:%.*]] = select [[TMP0]], [[A]], zeroinitializer // CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.famin.nxv4f32( [[TMP0]], [[TMP1]], [[B]]) // CHECK-NEXT: ret [[TMP2]] // // CHECK-CPP-LABEL: define dso_local @_Z16test_famin_f32_zu10__SVBool_tu13__SVFloat32_tS0_( // CHECK-CPP-SAME: [[PG:%.*]], [[A:%.*]], [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-CPP-NEXT: [[ENTRY:.*:]] // CHECK-CPP-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv4i1( [[PG]]) // CHECK-CPP-NEXT: [[TMP1:%.*]] = select [[TMP0]], [[A]], zeroinitializer // CHECK-CPP-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.famin.nxv4f32( [[TMP0]], [[TMP1]], [[B]]) // CHECK-CPP-NEXT: ret [[TMP2]] // svfloat32_t test_famin_f32_z(svbool_t pg, svfloat32_t a, svfloat32_t b) STREAMING { return SVE_ACLE_FUNC(svamin, _f32, _z)(pg, a, b); } // CHECK-LABEL: define dso_local @test_famin_n_f32_m( // CHECK-SAME: [[PG:%.*]], [[A:%.*]], float noundef [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-NEXT: [[ENTRY:.*:]] // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv4i1( [[PG]]) // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, float [[B]], i64 0 // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer // CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.famin.nxv4f32( [[TMP0]], [[A]], [[DOTSPLAT]]) // CHECK-NEXT: ret [[TMP1]] // // CHECK-CPP-LABEL: define dso_local @_Z18test_famin_n_f32_mu10__SVBool_tu13__SVFloat32_tf( // CHECK-CPP-SAME: [[PG:%.*]], [[A:%.*]], float noundef [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-CPP-NEXT: [[ENTRY:.*:]] // CHECK-CPP-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv4i1( [[PG]]) // CHECK-CPP-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, float [[B]], i64 0 // CHECK-CPP-NEXT: [[DOTSPLAT:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer // CHECK-CPP-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.famin.nxv4f32( [[TMP0]], [[A]], [[DOTSPLAT]]) // CHECK-CPP-NEXT: ret [[TMP1]] // svfloat32_t test_famin_n_f32_m(svbool_t pg, svfloat32_t a, float32_t b) STREAMING { return SVE_ACLE_FUNC(svamin, _n_f32, _m)(pg, a, b); } // CHECK-LABEL: define dso_local @test_famin_n_f32_x( // CHECK-SAME: [[PG:%.*]], [[A:%.*]], float noundef [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-NEXT: [[ENTRY:.*:]] // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv4i1( [[PG]]) // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, float [[B]], i64 0 // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer // CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.famin.u.nxv4f32( [[TMP0]], [[A]], [[DOTSPLAT]]) // CHECK-NEXT: ret [[TMP1]] // // CHECK-CPP-LABEL: define dso_local @_Z18test_famin_n_f32_xu10__SVBool_tu13__SVFloat32_tf( // CHECK-CPP-SAME: [[PG:%.*]], [[A:%.*]], float noundef [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-CPP-NEXT: [[ENTRY:.*:]] // CHECK-CPP-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv4i1( [[PG]]) // CHECK-CPP-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, float [[B]], i64 0 // CHECK-CPP-NEXT: [[DOTSPLAT:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer // CHECK-CPP-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.famin.u.nxv4f32( [[TMP0]], [[A]], [[DOTSPLAT]]) // CHECK-CPP-NEXT: ret [[TMP1]] // svfloat32_t test_famin_n_f32_x(svbool_t pg, svfloat32_t a, float32_t b) STREAMING { return SVE_ACLE_FUNC(svamin, _n_f32, _x)(pg, a, b); } // CHECK-LABEL: define dso_local @test_famin_n_f32_z( // CHECK-SAME: [[PG:%.*]], [[A:%.*]], float noundef [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-NEXT: [[ENTRY:.*:]] // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv4i1( [[PG]]) // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, float [[B]], i64 0 // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer // CHECK-NEXT: [[TMP1:%.*]] = select [[TMP0]], [[A]], zeroinitializer // CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.famin.nxv4f32( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CHECK-NEXT: ret [[TMP2]] // // CHECK-CPP-LABEL: define dso_local @_Z18test_famin_n_f32_zu10__SVBool_tu13__SVFloat32_tf( // CHECK-CPP-SAME: [[PG:%.*]], [[A:%.*]], float noundef [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-CPP-NEXT: [[ENTRY:.*:]] // CHECK-CPP-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv4i1( [[PG]]) // CHECK-CPP-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, float [[B]], i64 0 // CHECK-CPP-NEXT: [[DOTSPLAT:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer // CHECK-CPP-NEXT: [[TMP1:%.*]] = select [[TMP0]], [[A]], zeroinitializer // CHECK-CPP-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.famin.nxv4f32( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CHECK-CPP-NEXT: ret [[TMP2]] // svfloat32_t test_famin_n_f32_z(svbool_t pg, svfloat32_t a, float32_t b) STREAMING { return SVE_ACLE_FUNC(svamin, _n_f32, _z)(pg, a, b); } // CHECK-LABEL: define dso_local @test_famin_f64_m( // CHECK-SAME: [[PG:%.*]], [[A:%.*]], [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-NEXT: [[ENTRY:.*:]] // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv2i1( [[PG]]) // CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.famin.nxv2f64( [[TMP0]], [[A]], [[B]]) // CHECK-NEXT: ret [[TMP1]] // // CHECK-CPP-LABEL: define dso_local @_Z16test_famin_f64_mu10__SVBool_tu13__SVFloat64_tS0_( // CHECK-CPP-SAME: [[PG:%.*]], [[A:%.*]], [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-CPP-NEXT: [[ENTRY:.*:]] // CHECK-CPP-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv2i1( [[PG]]) // CHECK-CPP-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.famin.nxv2f64( [[TMP0]], [[A]], [[B]]) // CHECK-CPP-NEXT: ret [[TMP1]] // svfloat64_t test_famin_f64_m(svbool_t pg, svfloat64_t a, svfloat64_t b) STREAMING { return SVE_ACLE_FUNC(svamin, _f64, _m)(pg, a, b); } // CHECK-LABEL: define dso_local @test_famin_f64_x( // CHECK-SAME: [[PG:%.*]], [[A:%.*]], [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-NEXT: [[ENTRY:.*:]] // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv2i1( [[PG]]) // CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.famin.u.nxv2f64( [[TMP0]], [[A]], [[B]]) // CHECK-NEXT: ret [[TMP1]] // // CHECK-CPP-LABEL: define dso_local @_Z16test_famin_f64_xu10__SVBool_tu13__SVFloat64_tS0_( // CHECK-CPP-SAME: [[PG:%.*]], [[A:%.*]], [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-CPP-NEXT: [[ENTRY:.*:]] // CHECK-CPP-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv2i1( [[PG]]) // CHECK-CPP-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.famin.u.nxv2f64( [[TMP0]], [[A]], [[B]]) // CHECK-CPP-NEXT: ret [[TMP1]] // svfloat64_t test_famin_f64_x(svbool_t pg, svfloat64_t a, svfloat64_t b) STREAMING { return SVE_ACLE_FUNC(svamin, _f64, _x)(pg, a, b); } // CHECK-LABEL: define dso_local @test_famin_f64_z( // CHECK-SAME: [[PG:%.*]], [[A:%.*]], [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-NEXT: [[ENTRY:.*:]] // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv2i1( [[PG]]) // CHECK-NEXT: [[TMP1:%.*]] = select [[TMP0]], [[A]], zeroinitializer // CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.famin.nxv2f64( [[TMP0]], [[TMP1]], [[B]]) // CHECK-NEXT: ret [[TMP2]] // // CHECK-CPP-LABEL: define dso_local @_Z16test_famin_f64_zu10__SVBool_tu13__SVFloat64_tS0_( // CHECK-CPP-SAME: [[PG:%.*]], [[A:%.*]], [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-CPP-NEXT: [[ENTRY:.*:]] // CHECK-CPP-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv2i1( [[PG]]) // CHECK-CPP-NEXT: [[TMP1:%.*]] = select [[TMP0]], [[A]], zeroinitializer // CHECK-CPP-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.famin.nxv2f64( [[TMP0]], [[TMP1]], [[B]]) // CHECK-CPP-NEXT: ret [[TMP2]] // svfloat64_t test_famin_f64_z(svbool_t pg, svfloat64_t a, svfloat64_t b) STREAMING { return SVE_ACLE_FUNC(svamin, _f64, _z)(pg, a, b); } // CHECK-LABEL: define dso_local @test_famin_n_f64_m( // CHECK-SAME: [[PG:%.*]], [[A:%.*]], double noundef [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-NEXT: [[ENTRY:.*:]] // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv2i1( [[PG]]) // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, double [[B]], i64 0 // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer // CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.famin.nxv2f64( [[TMP0]], [[A]], [[DOTSPLAT]]) // CHECK-NEXT: ret [[TMP1]] // // CHECK-CPP-LABEL: define dso_local @_Z18test_famin_n_f64_mu10__SVBool_tu13__SVFloat64_td( // CHECK-CPP-SAME: [[PG:%.*]], [[A:%.*]], double noundef [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-CPP-NEXT: [[ENTRY:.*:]] // CHECK-CPP-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv2i1( [[PG]]) // CHECK-CPP-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, double [[B]], i64 0 // CHECK-CPP-NEXT: [[DOTSPLAT:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer // CHECK-CPP-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.famin.nxv2f64( [[TMP0]], [[A]], [[DOTSPLAT]]) // CHECK-CPP-NEXT: ret [[TMP1]] // svfloat64_t test_famin_n_f64_m(svbool_t pg, svfloat64_t a, float64_t b) STREAMING { return SVE_ACLE_FUNC(svamin, _n_f64, _m)(pg, a, b); } // CHECK-LABEL: define dso_local @test_famin_n_f64_x( // CHECK-SAME: [[PG:%.*]], [[A:%.*]], double noundef [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-NEXT: [[ENTRY:.*:]] // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv2i1( [[PG]]) // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, double [[B]], i64 0 // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer // CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.famin.u.nxv2f64( [[TMP0]], [[A]], [[DOTSPLAT]]) // CHECK-NEXT: ret [[TMP1]] // // CHECK-CPP-LABEL: define dso_local @_Z18test_famin_n_f64_xu10__SVBool_tu13__SVFloat64_td( // CHECK-CPP-SAME: [[PG:%.*]], [[A:%.*]], double noundef [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-CPP-NEXT: [[ENTRY:.*:]] // CHECK-CPP-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv2i1( [[PG]]) // CHECK-CPP-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, double [[B]], i64 0 // CHECK-CPP-NEXT: [[DOTSPLAT:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer // CHECK-CPP-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.famin.u.nxv2f64( [[TMP0]], [[A]], [[DOTSPLAT]]) // CHECK-CPP-NEXT: ret [[TMP1]] // svfloat64_t test_famin_n_f64_x(svbool_t pg, svfloat64_t a, float64_t b) STREAMING { return SVE_ACLE_FUNC(svamin, _n_f64, _x)(pg, a, b); } // CHECK-LABEL: define dso_local @test_famin_n_f64_z( // CHECK-SAME: [[PG:%.*]], [[A:%.*]], double noundef [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-NEXT: [[ENTRY:.*:]] // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv2i1( [[PG]]) // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, double [[B]], i64 0 // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer // CHECK-NEXT: [[TMP1:%.*]] = select [[TMP0]], [[A]], zeroinitializer // CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.famin.nxv2f64( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CHECK-NEXT: ret [[TMP2]] // // CHECK-CPP-LABEL: define dso_local @_Z18test_famin_n_f64_zu10__SVBool_tu13__SVFloat64_td( // CHECK-CPP-SAME: [[PG:%.*]], [[A:%.*]], double noundef [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-CPP-NEXT: [[ENTRY:.*:]] // CHECK-CPP-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv2i1( [[PG]]) // CHECK-CPP-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, double [[B]], i64 0 // CHECK-CPP-NEXT: [[DOTSPLAT:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer // CHECK-CPP-NEXT: [[TMP1:%.*]] = select [[TMP0]], [[A]], zeroinitializer // CHECK-CPP-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.famin.nxv2f64( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CHECK-CPP-NEXT: ret [[TMP2]] // svfloat64_t test_famin_n_f64_z(svbool_t pg, svfloat64_t a, float64_t b) STREAMING { return SVE_ACLE_FUNC(svamin, _n_f64, _z)(pg, a, b); } // CHECK-LABEL: define dso_local @test_famax_f16_m( // CHECK-SAME: [[PG:%.*]], [[A:%.*]], [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-NEXT: [[ENTRY:.*:]] // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv8i1( [[PG]]) // CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.famax.nxv8f16( [[TMP0]], [[A]], [[B]]) // CHECK-NEXT: ret [[TMP1]] // // CHECK-CPP-LABEL: define dso_local @_Z16test_famax_f16_mu10__SVBool_tu13__SVFloat16_tS0_( // CHECK-CPP-SAME: [[PG:%.*]], [[A:%.*]], [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-CPP-NEXT: [[ENTRY:.*:]] // CHECK-CPP-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv8i1( [[PG]]) // CHECK-CPP-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.famax.nxv8f16( [[TMP0]], [[A]], [[B]]) // CHECK-CPP-NEXT: ret [[TMP1]] // svfloat16_t test_famax_f16_m(svbool_t pg, svfloat16_t a, svfloat16_t b) STREAMING { return SVE_ACLE_FUNC(svamax, _f16, _m)(pg, a, b); } // CHECK-LABEL: define dso_local @test_famax_f16_x( // CHECK-SAME: [[PG:%.*]], [[A:%.*]], [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-NEXT: [[ENTRY:.*:]] // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv8i1( [[PG]]) // CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.famax.u.nxv8f16( [[TMP0]], [[A]], [[B]]) // CHECK-NEXT: ret [[TMP1]] // // CHECK-CPP-LABEL: define dso_local @_Z16test_famax_f16_xu10__SVBool_tu13__SVFloat16_tS0_( // CHECK-CPP-SAME: [[PG:%.*]], [[A:%.*]], [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-CPP-NEXT: [[ENTRY:.*:]] // CHECK-CPP-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv8i1( [[PG]]) // CHECK-CPP-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.famax.u.nxv8f16( [[TMP0]], [[A]], [[B]]) // CHECK-CPP-NEXT: ret [[TMP1]] // svfloat16_t test_famax_f16_x(svbool_t pg, svfloat16_t a, svfloat16_t b) STREAMING { return SVE_ACLE_FUNC(svamax, _f16, _x)(pg, a, b); } // CHECK-LABEL: define dso_local @test_famax_f16_z( // CHECK-SAME: [[PG:%.*]], [[A:%.*]], [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-NEXT: [[ENTRY:.*:]] // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv8i1( [[PG]]) // CHECK-NEXT: [[TMP1:%.*]] = select [[TMP0]], [[A]], zeroinitializer // CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.famax.nxv8f16( [[TMP0]], [[TMP1]], [[B]]) // CHECK-NEXT: ret [[TMP2]] // // CHECK-CPP-LABEL: define dso_local @_Z16test_famax_f16_zu10__SVBool_tu13__SVFloat16_tS0_( // CHECK-CPP-SAME: [[PG:%.*]], [[A:%.*]], [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-CPP-NEXT: [[ENTRY:.*:]] // CHECK-CPP-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv8i1( [[PG]]) // CHECK-CPP-NEXT: [[TMP1:%.*]] = select [[TMP0]], [[A]], zeroinitializer // CHECK-CPP-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.famax.nxv8f16( [[TMP0]], [[TMP1]], [[B]]) // CHECK-CPP-NEXT: ret [[TMP2]] // svfloat16_t test_famax_f16_z(svbool_t pg, svfloat16_t a, svfloat16_t b) STREAMING { return SVE_ACLE_FUNC(svamax, _f16, _z)(pg, a, b); } // CHECK-LABEL: define dso_local @test_famax_n_f16_m( // CHECK-SAME: [[PG:%.*]], [[A:%.*]], half noundef [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-NEXT: [[ENTRY:.*:]] // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv8i1( [[PG]]) // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, half [[B]], i64 0 // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer // CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.famax.nxv8f16( [[TMP0]], [[A]], [[DOTSPLAT]]) // CHECK-NEXT: ret [[TMP1]] // // CHECK-CPP-LABEL: define dso_local @_Z18test_famax_n_f16_mu10__SVBool_tu13__SVFloat16_tDh( // CHECK-CPP-SAME: [[PG:%.*]], [[A:%.*]], half noundef [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-CPP-NEXT: [[ENTRY:.*:]] // CHECK-CPP-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv8i1( [[PG]]) // CHECK-CPP-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, half [[B]], i64 0 // CHECK-CPP-NEXT: [[DOTSPLAT:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer // CHECK-CPP-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.famax.nxv8f16( [[TMP0]], [[A]], [[DOTSPLAT]]) // CHECK-CPP-NEXT: ret [[TMP1]] // svfloat16_t test_famax_n_f16_m(svbool_t pg, svfloat16_t a, float16_t b) STREAMING { return SVE_ACLE_FUNC(svamax, _n_f16, _m)(pg, a, b); } // CHECK-LABEL: define dso_local @test_famax_n_f16_x( // CHECK-SAME: [[PG:%.*]], [[A:%.*]], half noundef [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-NEXT: [[ENTRY:.*:]] // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv8i1( [[PG]]) // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, half [[B]], i64 0 // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer // CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.famax.u.nxv8f16( [[TMP0]], [[A]], [[DOTSPLAT]]) // CHECK-NEXT: ret [[TMP1]] // // CHECK-CPP-LABEL: define dso_local @_Z18test_famax_n_f16_xu10__SVBool_tu13__SVFloat16_tDh( // CHECK-CPP-SAME: [[PG:%.*]], [[A:%.*]], half noundef [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-CPP-NEXT: [[ENTRY:.*:]] // CHECK-CPP-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv8i1( [[PG]]) // CHECK-CPP-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, half [[B]], i64 0 // CHECK-CPP-NEXT: [[DOTSPLAT:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer // CHECK-CPP-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.famax.u.nxv8f16( [[TMP0]], [[A]], [[DOTSPLAT]]) // CHECK-CPP-NEXT: ret [[TMP1]] // svfloat16_t test_famax_n_f16_x(svbool_t pg, svfloat16_t a, float16_t b) STREAMING { return SVE_ACLE_FUNC(svamax, _n_f16, _x)(pg, a, b); } // CHECK-LABEL: define dso_local @test_famax_n_f16_z( // CHECK-SAME: [[PG:%.*]], [[A:%.*]], half noundef [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-NEXT: [[ENTRY:.*:]] // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv8i1( [[PG]]) // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, half [[B]], i64 0 // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer // CHECK-NEXT: [[TMP1:%.*]] = select [[TMP0]], [[A]], zeroinitializer // CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.famax.nxv8f16( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CHECK-NEXT: ret [[TMP2]] // // CHECK-CPP-LABEL: define dso_local @_Z18test_famax_n_f16_zu10__SVBool_tu13__SVFloat16_tDh( // CHECK-CPP-SAME: [[PG:%.*]], [[A:%.*]], half noundef [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-CPP-NEXT: [[ENTRY:.*:]] // CHECK-CPP-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv8i1( [[PG]]) // CHECK-CPP-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, half [[B]], i64 0 // CHECK-CPP-NEXT: [[DOTSPLAT:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer // CHECK-CPP-NEXT: [[TMP1:%.*]] = select [[TMP0]], [[A]], zeroinitializer // CHECK-CPP-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.famax.nxv8f16( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CHECK-CPP-NEXT: ret [[TMP2]] // svfloat16_t test_famax_n_f16_z(svbool_t pg, svfloat16_t a, float16_t b) STREAMING { return SVE_ACLE_FUNC(svamax, _n_f16, _z)(pg, a, b); } // CHECK-LABEL: define dso_local @test_famax_f32_m( // CHECK-SAME: [[PG:%.*]], [[A:%.*]], [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-NEXT: [[ENTRY:.*:]] // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv4i1( [[PG]]) // CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.famax.nxv4f32( [[TMP0]], [[A]], [[B]]) // CHECK-NEXT: ret [[TMP1]] // // CHECK-CPP-LABEL: define dso_local @_Z16test_famax_f32_mu10__SVBool_tu13__SVFloat32_tS0_( // CHECK-CPP-SAME: [[PG:%.*]], [[A:%.*]], [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-CPP-NEXT: [[ENTRY:.*:]] // CHECK-CPP-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv4i1( [[PG]]) // CHECK-CPP-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.famax.nxv4f32( [[TMP0]], [[A]], [[B]]) // CHECK-CPP-NEXT: ret [[TMP1]] // svfloat32_t test_famax_f32_m(svbool_t pg, svfloat32_t a, svfloat32_t b) STREAMING { return SVE_ACLE_FUNC(svamax, _f32, _m)(pg, a, b); } // CHECK-LABEL: define dso_local @test_famax_f32_x( // CHECK-SAME: [[PG:%.*]], [[A:%.*]], [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-NEXT: [[ENTRY:.*:]] // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv4i1( [[PG]]) // CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.famax.u.nxv4f32( [[TMP0]], [[A]], [[B]]) // CHECK-NEXT: ret [[TMP1]] // // CHECK-CPP-LABEL: define dso_local @_Z16test_famax_f32_xu10__SVBool_tu13__SVFloat32_tS0_( // CHECK-CPP-SAME: [[PG:%.*]], [[A:%.*]], [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-CPP-NEXT: [[ENTRY:.*:]] // CHECK-CPP-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv4i1( [[PG]]) // CHECK-CPP-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.famax.u.nxv4f32( [[TMP0]], [[A]], [[B]]) // CHECK-CPP-NEXT: ret [[TMP1]] // svfloat32_t test_famax_f32_x(svbool_t pg, svfloat32_t a, svfloat32_t b) STREAMING { return SVE_ACLE_FUNC(svamax, _f32, _x)(pg, a, b); } // CHECK-LABEL: define dso_local @test_famax_f32_z( // CHECK-SAME: [[PG:%.*]], [[A:%.*]], [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-NEXT: [[ENTRY:.*:]] // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv4i1( [[PG]]) // CHECK-NEXT: [[TMP1:%.*]] = select [[TMP0]], [[A]], zeroinitializer // CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.famax.nxv4f32( [[TMP0]], [[TMP1]], [[B]]) // CHECK-NEXT: ret [[TMP2]] // // CHECK-CPP-LABEL: define dso_local @_Z16test_famax_f32_zu10__SVBool_tu13__SVFloat32_tS0_( // CHECK-CPP-SAME: [[PG:%.*]], [[A:%.*]], [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-CPP-NEXT: [[ENTRY:.*:]] // CHECK-CPP-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv4i1( [[PG]]) // CHECK-CPP-NEXT: [[TMP1:%.*]] = select [[TMP0]], [[A]], zeroinitializer // CHECK-CPP-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.famax.nxv4f32( [[TMP0]], [[TMP1]], [[B]]) // CHECK-CPP-NEXT: ret [[TMP2]] // svfloat32_t test_famax_f32_z(svbool_t pg, svfloat32_t a, svfloat32_t b) STREAMING { return SVE_ACLE_FUNC(svamax, _f32, _z)(pg, a, b); } // CHECK-LABEL: define dso_local @test_famax_n_f32_m( // CHECK-SAME: [[PG:%.*]], [[A:%.*]], float noundef [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-NEXT: [[ENTRY:.*:]] // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv4i1( [[PG]]) // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, float [[B]], i64 0 // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer // CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.famax.nxv4f32( [[TMP0]], [[A]], [[DOTSPLAT]]) // CHECK-NEXT: ret [[TMP1]] // // CHECK-CPP-LABEL: define dso_local @_Z18test_famax_n_f32_mu10__SVBool_tu13__SVFloat32_tf( // CHECK-CPP-SAME: [[PG:%.*]], [[A:%.*]], float noundef [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-CPP-NEXT: [[ENTRY:.*:]] // CHECK-CPP-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv4i1( [[PG]]) // CHECK-CPP-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, float [[B]], i64 0 // CHECK-CPP-NEXT: [[DOTSPLAT:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer // CHECK-CPP-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.famax.nxv4f32( [[TMP0]], [[A]], [[DOTSPLAT]]) // CHECK-CPP-NEXT: ret [[TMP1]] // svfloat32_t test_famax_n_f32_m(svbool_t pg, svfloat32_t a, float32_t b) STREAMING { return SVE_ACLE_FUNC(svamax, _n_f32, _m)(pg, a, b); } // CHECK-LABEL: define dso_local @test_famax_n_f32_x( // CHECK-SAME: [[PG:%.*]], [[A:%.*]], float noundef [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-NEXT: [[ENTRY:.*:]] // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv4i1( [[PG]]) // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, float [[B]], i64 0 // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer // CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.famax.u.nxv4f32( [[TMP0]], [[A]], [[DOTSPLAT]]) // CHECK-NEXT: ret [[TMP1]] // // CHECK-CPP-LABEL: define dso_local @_Z18test_famax_n_f32_xu10__SVBool_tu13__SVFloat32_tf( // CHECK-CPP-SAME: [[PG:%.*]], [[A:%.*]], float noundef [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-CPP-NEXT: [[ENTRY:.*:]] // CHECK-CPP-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv4i1( [[PG]]) // CHECK-CPP-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, float [[B]], i64 0 // CHECK-CPP-NEXT: [[DOTSPLAT:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer // CHECK-CPP-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.famax.u.nxv4f32( [[TMP0]], [[A]], [[DOTSPLAT]]) // CHECK-CPP-NEXT: ret [[TMP1]] // svfloat32_t test_famax_n_f32_x(svbool_t pg, svfloat32_t a, float32_t b) STREAMING { return SVE_ACLE_FUNC(svamax, _n_f32, _x)(pg, a, b); } // CHECK-LABEL: define dso_local @test_famax_n_f32_z( // CHECK-SAME: [[PG:%.*]], [[A:%.*]], float noundef [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-NEXT: [[ENTRY:.*:]] // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv4i1( [[PG]]) // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, float [[B]], i64 0 // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer // CHECK-NEXT: [[TMP1:%.*]] = select [[TMP0]], [[A]], zeroinitializer // CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.famax.nxv4f32( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CHECK-NEXT: ret [[TMP2]] // // CHECK-CPP-LABEL: define dso_local @_Z18test_famax_n_f32_zu10__SVBool_tu13__SVFloat32_tf( // CHECK-CPP-SAME: [[PG:%.*]], [[A:%.*]], float noundef [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-CPP-NEXT: [[ENTRY:.*:]] // CHECK-CPP-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv4i1( [[PG]]) // CHECK-CPP-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, float [[B]], i64 0 // CHECK-CPP-NEXT: [[DOTSPLAT:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer // CHECK-CPP-NEXT: [[TMP1:%.*]] = select [[TMP0]], [[A]], zeroinitializer // CHECK-CPP-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.famax.nxv4f32( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CHECK-CPP-NEXT: ret [[TMP2]] // svfloat32_t test_famax_n_f32_z(svbool_t pg, svfloat32_t a, float32_t b) STREAMING { return SVE_ACLE_FUNC(svamax, _n_f32, _z)(pg, a, b); } // CHECK-LABEL: define dso_local @test_famax_f64_m( // CHECK-SAME: [[PG:%.*]], [[A:%.*]], [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-NEXT: [[ENTRY:.*:]] // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv2i1( [[PG]]) // CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.famax.nxv2f64( [[TMP0]], [[A]], [[B]]) // CHECK-NEXT: ret [[TMP1]] // // CHECK-CPP-LABEL: define dso_local @_Z16test_famax_f64_mu10__SVBool_tu13__SVFloat64_tS0_( // CHECK-CPP-SAME: [[PG:%.*]], [[A:%.*]], [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-CPP-NEXT: [[ENTRY:.*:]] // CHECK-CPP-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv2i1( [[PG]]) // CHECK-CPP-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.famax.nxv2f64( [[TMP0]], [[A]], [[B]]) // CHECK-CPP-NEXT: ret [[TMP1]] // svfloat64_t test_famax_f64_m(svbool_t pg, svfloat64_t a, svfloat64_t b) STREAMING { return SVE_ACLE_FUNC(svamax, _f64, _m)(pg, a, b); } // CHECK-LABEL: define dso_local @test_famax_f64_x( // CHECK-SAME: [[PG:%.*]], [[A:%.*]], [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-NEXT: [[ENTRY:.*:]] // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv2i1( [[PG]]) // CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.famax.u.nxv2f64( [[TMP0]], [[A]], [[B]]) // CHECK-NEXT: ret [[TMP1]] // // CHECK-CPP-LABEL: define dso_local @_Z16test_famax_f64_xu10__SVBool_tu13__SVFloat64_tS0_( // CHECK-CPP-SAME: [[PG:%.*]], [[A:%.*]], [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-CPP-NEXT: [[ENTRY:.*:]] // CHECK-CPP-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv2i1( [[PG]]) // CHECK-CPP-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.famax.u.nxv2f64( [[TMP0]], [[A]], [[B]]) // CHECK-CPP-NEXT: ret [[TMP1]] // svfloat64_t test_famax_f64_x(svbool_t pg, svfloat64_t a, svfloat64_t b) STREAMING { return SVE_ACLE_FUNC(svamax, _f64, _x)(pg, a, b); } // CHECK-LABEL: define dso_local @test_famax_f64_z( // CHECK-SAME: [[PG:%.*]], [[A:%.*]], [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-NEXT: [[ENTRY:.*:]] // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv2i1( [[PG]]) // CHECK-NEXT: [[TMP1:%.*]] = select [[TMP0]], [[A]], zeroinitializer // CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.famax.nxv2f64( [[TMP0]], [[TMP1]], [[B]]) // CHECK-NEXT: ret [[TMP2]] // // CHECK-CPP-LABEL: define dso_local @_Z16test_famax_f64_zu10__SVBool_tu13__SVFloat64_tS0_( // CHECK-CPP-SAME: [[PG:%.*]], [[A:%.*]], [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-CPP-NEXT: [[ENTRY:.*:]] // CHECK-CPP-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv2i1( [[PG]]) // CHECK-CPP-NEXT: [[TMP1:%.*]] = select [[TMP0]], [[A]], zeroinitializer // CHECK-CPP-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.famax.nxv2f64( [[TMP0]], [[TMP1]], [[B]]) // CHECK-CPP-NEXT: ret [[TMP2]] // svfloat64_t test_famax_f64_z(svbool_t pg, svfloat64_t a, svfloat64_t b) STREAMING { return SVE_ACLE_FUNC(svamax, _f64, _z)(pg, a, b); } // CHECK-LABEL: define dso_local @test_famax_n_f64_m( // CHECK-SAME: [[PG:%.*]], [[A:%.*]], double noundef [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-NEXT: [[ENTRY:.*:]] // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv2i1( [[PG]]) // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, double [[B]], i64 0 // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer // CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.famax.nxv2f64( [[TMP0]], [[A]], [[DOTSPLAT]]) // CHECK-NEXT: ret [[TMP1]] // // CHECK-CPP-LABEL: define dso_local @_Z18test_famax_n_f64_mu10__SVBool_tu13__SVFloat64_td( // CHECK-CPP-SAME: [[PG:%.*]], [[A:%.*]], double noundef [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-CPP-NEXT: [[ENTRY:.*:]] // CHECK-CPP-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv2i1( [[PG]]) // CHECK-CPP-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, double [[B]], i64 0 // CHECK-CPP-NEXT: [[DOTSPLAT:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer // CHECK-CPP-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.famax.nxv2f64( [[TMP0]], [[A]], [[DOTSPLAT]]) // CHECK-CPP-NEXT: ret [[TMP1]] // svfloat64_t test_famax_n_f64_m(svbool_t pg, svfloat64_t a, float64_t b) STREAMING { return SVE_ACLE_FUNC(svamax, _n_f64, _m)(pg, a, b); } // CHECK-LABEL: define dso_local @test_famax_n_f64_x( // CHECK-SAME: [[PG:%.*]], [[A:%.*]], double noundef [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-NEXT: [[ENTRY:.*:]] // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv2i1( [[PG]]) // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, double [[B]], i64 0 // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer // CHECK-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.famax.u.nxv2f64( [[TMP0]], [[A]], [[DOTSPLAT]]) // CHECK-NEXT: ret [[TMP1]] // // CHECK-CPP-LABEL: define dso_local @_Z18test_famax_n_f64_xu10__SVBool_tu13__SVFloat64_td( // CHECK-CPP-SAME: [[PG:%.*]], [[A:%.*]], double noundef [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-CPP-NEXT: [[ENTRY:.*:]] // CHECK-CPP-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv2i1( [[PG]]) // CHECK-CPP-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, double [[B]], i64 0 // CHECK-CPP-NEXT: [[DOTSPLAT:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer // CHECK-CPP-NEXT: [[TMP1:%.*]] = tail call @llvm.aarch64.sve.famax.u.nxv2f64( [[TMP0]], [[A]], [[DOTSPLAT]]) // CHECK-CPP-NEXT: ret [[TMP1]] // svfloat64_t test_famax_n_f64_x(svbool_t pg, svfloat64_t a, float64_t b) STREAMING { return SVE_ACLE_FUNC(svamax, _n_f64, _x)(pg, a, b); } // CHECK-LABEL: define dso_local @test_famax_n_f64_z( // CHECK-SAME: [[PG:%.*]], [[A:%.*]], double noundef [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-NEXT: [[ENTRY:.*:]] // CHECK-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv2i1( [[PG]]) // CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, double [[B]], i64 0 // CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer // CHECK-NEXT: [[TMP1:%.*]] = select [[TMP0]], [[A]], zeroinitializer // CHECK-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.famax.nxv2f64( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CHECK-NEXT: ret [[TMP2]] // // CHECK-CPP-LABEL: define dso_local @_Z18test_famax_n_f64_zu10__SVBool_tu13__SVFloat64_td( // CHECK-CPP-SAME: [[PG:%.*]], [[A:%.*]], double noundef [[B:%.*]]) local_unnamed_addr #[[ATTR0]] { // CHECK-CPP-NEXT: [[ENTRY:.*:]] // CHECK-CPP-NEXT: [[TMP0:%.*]] = tail call @llvm.aarch64.sve.convert.from.svbool.nxv2i1( [[PG]]) // CHECK-CPP-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement poison, double [[B]], i64 0 // CHECK-CPP-NEXT: [[DOTSPLAT:%.*]] = shufflevector [[DOTSPLATINSERT]], poison, zeroinitializer // CHECK-CPP-NEXT: [[TMP1:%.*]] = select [[TMP0]], [[A]], zeroinitializer // CHECK-CPP-NEXT: [[TMP2:%.*]] = tail call @llvm.aarch64.sve.famax.nxv2f64( [[TMP0]], [[TMP1]], [[DOTSPLAT]]) // CHECK-CPP-NEXT: ret [[TMP2]] // svfloat64_t test_famax_n_f64_z(svbool_t pg, svfloat64_t a, float64_t b) STREAMING { return SVE_ACLE_FUNC(svamax, _n_f64, _z)(pg, a, b); }