// 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 +sme2p2 -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 +sme2p2 -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 +sme2p2 -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 +sme2p2 -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 +sme2p2 -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_f16_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.nxv8f16( [[ZDN_COERCE0]], [[ZDN_COERCE1]], [[ZM]]) // CHECK-NEXT: ret { , } [[TMP0]] // // CPP-CHECK-LABEL: define dso_local { , } @_Z24test_svmul_single_f16_x213svfloat16x2_tu13__SVFloat16_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.nxv8f16( [[ZDN_COERCE0]], [[ZDN_COERCE1]], [[ZM]]) // CPP-CHECK-NEXT: ret { , } [[TMP0]] // svfloat16x2_t test_svmul_single_f16_x2(svfloat16x2_t zdn, svfloat16_t zm) __arm_streaming{ return SVE_ACLE_FUNC(svmul,_single_f16_x2)(zdn, zm); } // CHECK-LABEL: define dso_local { , , , } @test_svmul_single_f16_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.nxv8f16( [[ZDN_COERCE0]], [[ZDN_COERCE1]], [[ZDN_COERCE2]], [[ZDN_COERCE3]], [[ZM]]) // CHECK-NEXT: ret { , , , } [[TMP0]] // // CPP-CHECK-LABEL: define dso_local { , , , } @_Z24test_svmul_single_f16_x413svfloat16x4_tu13__SVFloat16_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.nxv8f16( [[ZDN_COERCE0]], [[ZDN_COERCE1]], [[ZDN_COERCE2]], [[ZDN_COERCE3]], [[ZM]]) // CPP-CHECK-NEXT: ret { , , , } [[TMP0]] // svfloat16x4_t test_svmul_single_f16_x4(svfloat16x4_t zdn, svfloat16_t zm) __arm_streaming{ return SVE_ACLE_FUNC(svmul,_single_f16_x4)(zdn, zm); } // CHECK-LABEL: define dso_local { , } @test_svmul_f16_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.nxv8f16( [[ZDN_COERCE0]], [[ZDN_COERCE1]], [[ZM_COERCE0]], [[ZM_COERCE1]]) // CHECK-NEXT: ret { , } [[TMP0]] // // CPP-CHECK-LABEL: define dso_local { , } @_Z17test_svmul_f16_x213svfloat16x2_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.nxv8f16( [[ZDN_COERCE0]], [[ZDN_COERCE1]], [[ZM_COERCE0]], [[ZM_COERCE1]]) // CPP-CHECK-NEXT: ret { , } [[TMP0]] // svfloat16x2_t test_svmul_f16_x2(svfloat16x2_t zdn, svfloat16x2_t zm) __arm_streaming{ return SVE_ACLE_FUNC(svmul,_f16_x2)(zdn, zm); } // CHECK-LABEL: define dso_local { , , , } @test_svmul_f16_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.nxv8f16( [[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 { , , , } @_Z17test_svmul_f16_x413svfloat16x4_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.nxv8f16( [[ZDN_COERCE0]], [[ZDN_COERCE1]], [[ZDN_COERCE2]], [[ZDN_COERCE3]], [[ZM_COERCE0]], [[ZM_COERCE1]], [[ZM_COERCE2]], [[ZM_COERCE3]]) // CPP-CHECK-NEXT: ret { , , , } [[TMP0]] // svfloat16x4_t test_svmul_f16_x4(svfloat16x4_t zdn, svfloat16x4_t zm) __arm_streaming{ return SVE_ACLE_FUNC(svmul,_f16_x4)(zdn, zm); } // CHECK-LABEL: define dso_local { , } @test_svmul_single_f32_x2( // CHECK-SAME: [[ZDN_COERCE0:%.*]], [[ZDN_COERCE1:%.*]], [[ZM:%.*]]) #[[ATTR0]] { // CHECK-NEXT: [[ENTRY:.*:]] // CHECK-NEXT: [[TMP0:%.*]] = tail call { , } @llvm.aarch64.sve.fmul.single.x2.nxv4f32( [[ZDN_COERCE0]], [[ZDN_COERCE1]], [[ZM]]) // CHECK-NEXT: ret { , } [[TMP0]] // // CPP-CHECK-LABEL: define dso_local { , } @_Z24test_svmul_single_f32_x213svfloat32x2_tu13__SVFloat32_t( // CPP-CHECK-SAME: [[ZDN_COERCE0:%.*]], [[ZDN_COERCE1:%.*]], [[ZM:%.*]]) #[[ATTR0]] { // CPP-CHECK-NEXT: [[ENTRY:.*:]] // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call { , } @llvm.aarch64.sve.fmul.single.x2.nxv4f32( [[ZDN_COERCE0]], [[ZDN_COERCE1]], [[ZM]]) // CPP-CHECK-NEXT: ret { , } [[TMP0]] // svfloat32x2_t test_svmul_single_f32_x2(svfloat32x2_t zdn, svfloat32_t zm) __arm_streaming{ return SVE_ACLE_FUNC(svmul,_single_f32_x2)(zdn, zm); } // CHECK-LABEL: define dso_local { , , , } @test_svmul_single_f32_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.nxv4f32( [[ZDN_COERCE0]], [[ZDN_COERCE1]], [[ZDN_COERCE2]], [[ZDN_COERCE3]], [[ZM]]) // CHECK-NEXT: ret { , , , } [[TMP0]] // // CPP-CHECK-LABEL: define dso_local { , , , } @_Z24test_svmul_single_f32_x413svfloat32x4_tu13__SVFloat32_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.nxv4f32( [[ZDN_COERCE0]], [[ZDN_COERCE1]], [[ZDN_COERCE2]], [[ZDN_COERCE3]], [[ZM]]) // CPP-CHECK-NEXT: ret { , , , } [[TMP0]] // svfloat32x4_t test_svmul_single_f32_x4(svfloat32x4_t zdn, svfloat32_t zm) __arm_streaming{ return SVE_ACLE_FUNC(svmul,_single_f32_x4)(zdn, zm); } // CHECK-LABEL: define dso_local { , } @test_svmul_f32_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.nxv4f32( [[ZDN_COERCE0]], [[ZDN_COERCE1]], [[ZM_COERCE0]], [[ZM_COERCE1]]) // CHECK-NEXT: ret { , } [[TMP0]] // // CPP-CHECK-LABEL: define dso_local { , } @_Z17test_svmul_f32_x213svfloat32x2_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.nxv4f32( [[ZDN_COERCE0]], [[ZDN_COERCE1]], [[ZM_COERCE0]], [[ZM_COERCE1]]) // CPP-CHECK-NEXT: ret { , } [[TMP0]] // svfloat32x2_t test_svmul_f32_x2(svfloat32x2_t zdn, svfloat32x2_t zm) __arm_streaming{ return SVE_ACLE_FUNC(svmul,_f32_x2)(zdn, zm); } // CHECK-LABEL: define dso_local { , , , } @test_svmul_f32_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.nxv4f32( [[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 { , , , } @_Z17test_svmul_f32_x413svfloat32x4_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.nxv4f32( [[ZDN_COERCE0]], [[ZDN_COERCE1]], [[ZDN_COERCE2]], [[ZDN_COERCE3]], [[ZM_COERCE0]], [[ZM_COERCE1]], [[ZM_COERCE2]], [[ZM_COERCE3]]) // CPP-CHECK-NEXT: ret { , , , } [[TMP0]] // svfloat32x4_t test_svmul_f32_x4(svfloat32x4_t zdn, svfloat32x4_t zm) __arm_streaming{ return SVE_ACLE_FUNC(svmul,_f32_x4)(zdn, zm); } // CHECK-LABEL: define dso_local { , } @test_svmul_single_f64_x2( // CHECK-SAME: [[ZDN_COERCE0:%.*]], [[ZDN_COERCE1:%.*]], [[ZM:%.*]]) #[[ATTR0]] { // CHECK-NEXT: [[ENTRY:.*:]] // CHECK-NEXT: [[TMP0:%.*]] = tail call { , } @llvm.aarch64.sve.fmul.single.x2.nxv2f64( [[ZDN_COERCE0]], [[ZDN_COERCE1]], [[ZM]]) // CHECK-NEXT: ret { , } [[TMP0]] // // CPP-CHECK-LABEL: define dso_local { , } @_Z24test_svmul_single_f64_x213svfloat64x2_tu13__SVFloat64_t( // CPP-CHECK-SAME: [[ZDN_COERCE0:%.*]], [[ZDN_COERCE1:%.*]], [[ZM:%.*]]) #[[ATTR0]] { // CPP-CHECK-NEXT: [[ENTRY:.*:]] // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call { , } @llvm.aarch64.sve.fmul.single.x2.nxv2f64( [[ZDN_COERCE0]], [[ZDN_COERCE1]], [[ZM]]) // CPP-CHECK-NEXT: ret { , } [[TMP0]] // svfloat64x2_t test_svmul_single_f64_x2(svfloat64x2_t zdn, svfloat64_t zm) __arm_streaming{ return SVE_ACLE_FUNC(svmul,_single_f64_x2)(zdn, zm); } // CHECK-LABEL: define dso_local { , , , } @test_svmul_single_f64_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.nxv2f64( [[ZDN_COERCE0]], [[ZDN_COERCE1]], [[ZDN_COERCE2]], [[ZDN_COERCE3]], [[ZM]]) // CHECK-NEXT: ret { , , , } [[TMP0]] // // CPP-CHECK-LABEL: define dso_local { , , , } @_Z24test_svmul_single_f64_x413svfloat64x4_tu13__SVFloat64_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.nxv2f64( [[ZDN_COERCE0]], [[ZDN_COERCE1]], [[ZDN_COERCE2]], [[ZDN_COERCE3]], [[ZM]]) // CPP-CHECK-NEXT: ret { , , , } [[TMP0]] // svfloat64x4_t test_svmul_single_f64_x4(svfloat64x4_t zdn, svfloat64_t zm) __arm_streaming{ return SVE_ACLE_FUNC(svmul,_single_f64_x4)(zdn, zm); } // CHECK-LABEL: define dso_local { , } @test_svmul_f64_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.nxv2f64( [[ZDN_COERCE0]], [[ZDN_COERCE1]], [[ZM_COERCE0]], [[ZM_COERCE1]]) // CHECK-NEXT: ret { , } [[TMP0]] // // CPP-CHECK-LABEL: define dso_local { , } @_Z17test_svmul_f64_x213svfloat64x2_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.nxv2f64( [[ZDN_COERCE0]], [[ZDN_COERCE1]], [[ZM_COERCE0]], [[ZM_COERCE1]]) // CPP-CHECK-NEXT: ret { , } [[TMP0]] // svfloat64x2_t test_svmul_f64_x2(svfloat64x2_t zdn, svfloat64x2_t zm) __arm_streaming{ return SVE_ACLE_FUNC(svmul,_f64_x2)(zdn, zm); } // CHECK-LABEL: define dso_local { , , , } @test_svmul_f64_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.nxv2f64( [[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 { , , , } @_Z17test_svmul_f64_x413svfloat64x4_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.nxv2f64( [[ZDN_COERCE0]], [[ZDN_COERCE1]], [[ZDN_COERCE2]], [[ZDN_COERCE3]], [[ZM_COERCE0]], [[ZM_COERCE1]], [[ZM_COERCE2]], [[ZM_COERCE3]]) // CPP-CHECK-NEXT: ret { , , , } [[TMP0]] // svfloat64x4_t test_svmul_f64_x4(svfloat64x4_t zdn, svfloat64x4_t zm) __arm_streaming{ return SVE_ACLE_FUNC(svmul,_f64_x4)(zdn, zm); }