| 1 |
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py |
| 2 |
|
| 3 |
// REQUIRES: aarch64-registered-target |
| 4 |
|
| 5 |
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme -target-feature +sme-f16f16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -p mem2reg,instcombine,tailcallelim | FileCheck %s |
| 6 |
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme -target-feature +sme-f16f16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -p mem2reg,instcombine,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK |
| 7 |
// RUN: %clang_cc1 -D__SVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sme -target-feature +sme-f16f16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -p mem2reg,instcombine,tailcallelim | FileCheck %s |
| 8 |
// RUN: %clang_cc1 -D__SVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sme -target-feature +sme-f16f16 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -p mem2reg,instcombine,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK |
| 9 |
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme -target-feature +sme-f16f16 -disable-O0-optnone -Werror -Wall -o /dev/null %s |
| 10 |
|
| 11 |
#include <arm_sme.h> |
| 12 |
|
| 13 |
#ifdef SVE_OVERLOADED_FORMS |
| 14 |
// A simple used,unused... macro, long enough to represent any SVE builtin. |
| 15 |
#define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3 |
| 16 |
#else |
| 17 |
#define SVE_ACLE_FUNC(A1,A2,A3,A4) A1##A2##A3##A4 |
| 18 |
#endif |
| 19 |
|
| 20 |
// CHECK-LABEL: @test_cvtl_f32_x2( |
| 21 |
// CHECK-NEXT: entry: |
| 22 |
// CHECK-NEXT: [[TMP0:%.*]] = tail call { <vscale x 4 x float>, <vscale x 4 x float> } @llvm.aarch64.sve.fcvtl.widen.x2.nxv4f32(<vscale x 8 x half> [[ZN:%.*]]) |
| 23 |
// CHECK-NEXT: ret { <vscale x 4 x float>, <vscale x 4 x float> } [[TMP0]] |
| 24 |
// |
| 25 |
// CPP-CHECK-LABEL: @_Z16test_cvtl_f32_x2u13__SVFloat16_t( |
| 26 |
// CPP-CHECK-NEXT: entry: |
| 27 |
// CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call { <vscale x 4 x float>, <vscale x 4 x float> } @llvm.aarch64.sve.fcvtl.widen.x2.nxv4f32(<vscale x 8 x half> [[ZN:%.*]]) |
| 28 |
// CPP-CHECK-NEXT: ret { <vscale x 4 x float>, <vscale x 4 x float> } [[TMP0]] |
| 29 |
// |
| 30 |
svfloat32x2_t test_cvtl_f32_x2(svfloat16_t zn) __arm_streaming { |
| 31 |
return SVE_ACLE_FUNC(svcvtl_f32,_f16_x2,,)(zn); |
| 32 |
} |