// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 6 // REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme -target-feature +sme2 -target-feature +sve-bfscale -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -p mem2reg,instcombine,tailcallelim | FileCheck %s // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme -target-feature +sme2 -target-feature +sve-bfscale -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -p mem2reg,instcombine,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sme -target-feature +sme2 -target-feature +sve-bfscale -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -p mem2reg,instcombine,tailcallelim | FileCheck %s // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sme -target-feature +sme2 -target-feature +sve-bfscale -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -p mem2reg,instcombine,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme -target-feature +sme2 -target-feature +sve-bfscale -S -disable-O0-optnone -Werror -Wall -o /dev/null %s #include #ifdef SVE_OVERLOADED_FORMS // A simple used,unused... macro, long enough to represent any SVE builtin. #define SVE_ACLE_FUNC(A1,A2_UNUSED) A1 #else #define SVE_ACLE_FUNC(A1,A2) A1##A2 #endif // CHECK-LABEL: define dso_local { , } @test_svmul_single_bf16_x2( // CHECK-SAME: [[ZDN_COERCE0:%.*]], [[ZDN_COERCE1:%.*]], [[ZM:%.*]]) #[[ATTR0:[0-9]+]] { // CHECK-NEXT: [[ENTRY:.*:]] // CHECK-NEXT: [[TMP0:%.*]] = tail call { , } @llvm.aarch64.sve.fmul.single.x2.nxv8bf16( [[ZDN_COERCE0]], [[ZDN_COERCE1]], [[ZM]]) // CHECK-NEXT: ret { , } [[TMP0]] // // CPP-CHECK-LABEL: define dso_local { , } @_Z25test_svmul_single_bf16_x214svbfloat16x2_tu14__SVBfloat16_t( // CPP-CHECK-SAME: [[ZDN_COERCE0:%.*]], [[ZDN_COERCE1:%.*]], [[ZM:%.*]]) #[[ATTR0:[0-9]+]] { // CPP-CHECK-NEXT: [[ENTRY:.*:]] // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call { , } @llvm.aarch64.sve.fmul.single.x2.nxv8bf16( [[ZDN_COERCE0]], [[ZDN_COERCE1]], [[ZM]]) // CPP-CHECK-NEXT: ret { , } [[TMP0]] // svbfloat16x2_t test_svmul_single_bf16_x2(svbfloat16x2_t zdn, svbfloat16_t zm) __arm_streaming{ return SVE_ACLE_FUNC(svmul,_single_bf16_x2)(zdn, zm); } // CHECK-LABEL: define dso_local { , , , } @test_svmul_single_bf16_x4( // CHECK-SAME: [[ZDN_COERCE0:%.*]], [[ZDN_COERCE1:%.*]], [[ZDN_COERCE2:%.*]], [[ZDN_COERCE3:%.*]], [[ZM:%.*]]) #[[ATTR0]] { // CHECK-NEXT: [[ENTRY:.*:]] // CHECK-NEXT: [[TMP0:%.*]] = tail call { , , , } @llvm.aarch64.sve.fmul.single.x4.nxv8bf16( [[ZDN_COERCE0]], [[ZDN_COERCE1]], [[ZDN_COERCE2]], [[ZDN_COERCE3]], [[ZM]]) // CHECK-NEXT: ret { , , , } [[TMP0]] // // CPP-CHECK-LABEL: define dso_local { , , , } @_Z25test_svmul_single_bf16_x414svbfloat16x4_tu14__SVBfloat16_t( // CPP-CHECK-SAME: [[ZDN_COERCE0:%.*]], [[ZDN_COERCE1:%.*]], [[ZDN_COERCE2:%.*]], [[ZDN_COERCE3:%.*]], [[ZM:%.*]]) #[[ATTR0]] { // CPP-CHECK-NEXT: [[ENTRY:.*:]] // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call { , , , } @llvm.aarch64.sve.fmul.single.x4.nxv8bf16( [[ZDN_COERCE0]], [[ZDN_COERCE1]], [[ZDN_COERCE2]], [[ZDN_COERCE3]], [[ZM]]) // CPP-CHECK-NEXT: ret { , , , } [[TMP0]] // svbfloat16x4_t test_svmul_single_bf16_x4(svbfloat16x4_t zdn, svbfloat16_t zm) __arm_streaming{ return SVE_ACLE_FUNC(svmul,_single_bf16_x4)(zdn, zm); } // CHECK-LABEL: define dso_local { , } @test_svmul_bf16_x2( // CHECK-SAME: [[ZDN_COERCE0:%.*]], [[ZDN_COERCE1:%.*]], [[ZM_COERCE0:%.*]], [[ZM_COERCE1:%.*]]) #[[ATTR0]] { // CHECK-NEXT: [[ENTRY:.*:]] // CHECK-NEXT: [[TMP0:%.*]] = tail call { , } @llvm.aarch64.sve.fmul.x2.nxv8bf16( [[ZDN_COERCE0]], [[ZDN_COERCE1]], [[ZM_COERCE0]], [[ZM_COERCE1]]) // CHECK-NEXT: ret { , } [[TMP0]] // // CPP-CHECK-LABEL: define dso_local { , } @_Z18test_svmul_bf16_x214svbfloat16x2_tS_( // CPP-CHECK-SAME: [[ZDN_COERCE0:%.*]], [[ZDN_COERCE1:%.*]], [[ZM_COERCE0:%.*]], [[ZM_COERCE1:%.*]]) #[[ATTR0]] { // CPP-CHECK-NEXT: [[ENTRY:.*:]] // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call { , } @llvm.aarch64.sve.fmul.x2.nxv8bf16( [[ZDN_COERCE0]], [[ZDN_COERCE1]], [[ZM_COERCE0]], [[ZM_COERCE1]]) // CPP-CHECK-NEXT: ret { , } [[TMP0]] // svbfloat16x2_t test_svmul_bf16_x2(svbfloat16x2_t zdn, svbfloat16x2_t zm) __arm_streaming{ return SVE_ACLE_FUNC(svmul,_bf16_x2)(zdn, zm); } // CHECK-LABEL: define dso_local { , , , } @test_svmul_bf16_x4( // CHECK-SAME: [[ZDN_COERCE0:%.*]], [[ZDN_COERCE1:%.*]], [[ZDN_COERCE2:%.*]], [[ZDN_COERCE3:%.*]], [[ZM_COERCE0:%.*]], [[ZM_COERCE1:%.*]], [[ZM_COERCE2:%.*]], [[ZM_COERCE3:%.*]]) #[[ATTR0]] { // CHECK-NEXT: [[ENTRY:.*:]] // CHECK-NEXT: [[TMP0:%.*]] = tail call { , , , } @llvm.aarch64.sve.fmul.x4.nxv8bf16( [[ZDN_COERCE0]], [[ZDN_COERCE1]], [[ZDN_COERCE2]], [[ZDN_COERCE3]], [[ZM_COERCE0]], [[ZM_COERCE1]], [[ZM_COERCE2]], [[ZM_COERCE3]]) // CHECK-NEXT: ret { , , , } [[TMP0]] // // CPP-CHECK-LABEL: define dso_local { , , , } @_Z18test_svmul_bf16_x414svbfloat16x4_tS_( // CPP-CHECK-SAME: [[ZDN_COERCE0:%.*]], [[ZDN_COERCE1:%.*]], [[ZDN_COERCE2:%.*]], [[ZDN_COERCE3:%.*]], [[ZM_COERCE0:%.*]], [[ZM_COERCE1:%.*]], [[ZM_COERCE2:%.*]], [[ZM_COERCE3:%.*]]) #[[ATTR0]] { // CPP-CHECK-NEXT: [[ENTRY:.*:]] // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call { , , , } @llvm.aarch64.sve.fmul.x4.nxv8bf16( [[ZDN_COERCE0]], [[ZDN_COERCE1]], [[ZDN_COERCE2]], [[ZDN_COERCE3]], [[ZM_COERCE0]], [[ZM_COERCE1]], [[ZM_COERCE2]], [[ZM_COERCE3]]) // CPP-CHECK-NEXT: ret { , , , } [[TMP0]] // svbfloat16x4_t test_svmul_bf16_x4(svbfloat16x4_t zdn, svbfloat16x4_t zm) __arm_streaming{ return SVE_ACLE_FUNC(svmul,_bf16_x4)(zdn, zm); }