56 lines · c
1// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py2// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +sve-sha3 -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s3// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +sme2p1 -target-feature +sve-sha3 -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s4// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +sve-sha3 -O1 -Werror -Wall -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefix=CPP-CHECK5// RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +sve-sha3 -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s6// RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +sve-sha3 -O1 -Werror -Wall -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefix=CPP-CHECK7 8// REQUIRES: aarch64-registered-target9 10#include <arm_sve.h>11 12#ifdef SVE_OVERLOADED_FORMS13// A simple used,unused... macro, long enough to represent any SVE builtin.14#define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A315#else16#define SVE_ACLE_FUNC(A1,A2,A3,A4) A1##A2##A3##A417#endif18 19#if defined(__ARM_FEATURE_SME) && defined(__ARM_FEATURE_SVE)20#define ATTR __arm_streaming_compatible21#elif defined(__ARM_FEATURE_SME)22#define ATTR __arm_streaming23#else24#define ATTR25#endif26 27// CHECK-LABEL: @test_svrax1_s64(28// CHECK-NEXT: entry:29// CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.rax1(<vscale x 2 x i64> [[OP1:%.*]], <vscale x 2 x i64> [[OP2:%.*]])30// CHECK-NEXT: ret <vscale x 2 x i64> [[TMP0]]31//32// CPP-CHECK-LABEL: @_Z15test_svrax1_s64u11__SVInt64_tS_(33// CPP-CHECK-NEXT: entry:34// CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.rax1(<vscale x 2 x i64> [[OP1:%.*]], <vscale x 2 x i64> [[OP2:%.*]])35// CPP-CHECK-NEXT: ret <vscale x 2 x i64> [[TMP0]]36//37svint64_t test_svrax1_s64(svint64_t op1, svint64_t op2) ATTR38{39 return SVE_ACLE_FUNC(svrax1,_s64,,)(op1, op2);40}41 42// CHECK-LABEL: @test_svrax1_u64(43// CHECK-NEXT: entry:44// CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.rax1(<vscale x 2 x i64> [[OP1:%.*]], <vscale x 2 x i64> [[OP2:%.*]])45// CHECK-NEXT: ret <vscale x 2 x i64> [[TMP0]]46//47// CPP-CHECK-LABEL: @_Z15test_svrax1_u64u12__SVUint64_tS_(48// CPP-CHECK-NEXT: entry:49// CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i64> @llvm.aarch64.sve.rax1(<vscale x 2 x i64> [[OP1:%.*]], <vscale x 2 x i64> [[OP2:%.*]])50// CPP-CHECK-NEXT: ret <vscale x 2 x i64> [[TMP0]]51//52svuint64_t test_svrax1_u64(svuint64_t op1, svuint64_t op2) ATTR53{54 return SVE_ACLE_FUNC(svrax1,_u64,,)(op1, op2);55}56