| 1 |
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 6 |
| 2 |
// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +sve-f16f32mm -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s |
| 3 |
// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +sve-f16f32mm -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK |
| 4 |
// RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +sve-f16f32mm -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s |
| 5 |
// RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +sve-f16f32mm -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK |
| 6 |
// RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +sve-f16f32mm -S -disable-O0-optnone -Werror -Wall -o /dev/null %s |
| 7 |
|
| 8 |
// REQUIRES: aarch64-registered-target |
| 9 |
|
| 10 |
#include <arm_sve.h> |
| 11 |
|
| 12 |
#ifdef SVE_OVERLOADED_FORMS |
| 13 |
#define SVE_ACLE_FUNC(A1, A3) A1##A3 |
| 14 |
#else |
| 15 |
#define SVE_ACLE_FUNC(A1, A2) A1##A2 |
| 16 |
#endif |
| 17 |
|
| 18 |
|
| 19 |
// CHECK-LABEL: define dso_local <vscale x 4 x float> @test_f32f16( |
| 20 |
// CHECK-SAME: <vscale x 4 x float> [[ACC:%.*]], <vscale x 8 x half> [[A:%.*]], <vscale x 8 x half> [[B:%.*]]) #[[ATTR0:[0-9]+]] { |
| 21 |
// CHECK-NEXT: [[ENTRY:.*:]] |
| 22 |
// CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x float> @llvm.aarch64.sve.fmmla.nxv4f32.nxv8f16(<vscale x 4 x float> [[ACC]], <vscale x 8 x half> [[A]], <vscale x 8 x half> [[B]]) |
| 23 |
// CHECK-NEXT: ret <vscale x 4 x float> [[TMP0]] |
| 24 |
// |
| 25 |
// CPP-CHECK-LABEL: define dso_local <vscale x 4 x float> @_Z11test_f32f16u13__SVFloat32_tu13__SVFloat16_tS0_( |
| 26 |
// CPP-CHECK-SAME: <vscale x 4 x float> [[ACC:%.*]], <vscale x 8 x half> [[A:%.*]], <vscale x 8 x half> [[B:%.*]]) #[[ATTR0:[0-9]+]] { |
| 27 |
// CPP-CHECK-NEXT: [[ENTRY:.*:]] |
| 28 |
// CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x float> @llvm.aarch64.sve.fmmla.nxv4f32.nxv8f16(<vscale x 4 x float> [[ACC]], <vscale x 8 x half> [[A]], <vscale x 8 x half> [[B]]) |
| 29 |
// CPP-CHECK-NEXT: ret <vscale x 4 x float> [[TMP0]] |
| 30 |
// |
| 31 |
svfloat32_t test_f32f16(svfloat32_t acc, svfloat16_t a, svfloat16_t b) { |
| 32 |
return SVE_ACLE_FUNC(svmmla, _f32_f16)(acc, a, b); |
| 33 |
} |