Debian Codegraph @

clang/test/CodeGen/AArch64/sve2-intrinsics/acle_sve2_rax1.c

raw
1 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
2 // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +sve-sha3 -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s
3 // 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 %s
4 // 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-CHECK
5 // 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 %s
6 // 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-CHECK
7
8 // REQUIRES: aarch64-registered-target
9
10 #include <arm_sve.h>
11
12 #ifdef SVE_OVERLOADED_FORMS
13 // A simple used,unused... macro, long enough to represent any SVE builtin.
14 #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3
15 #else
16 #define SVE_ACLE_FUNC(A1,A2,A3,A4) A1##A2##A3##A4
17 #endif
18
19 #if defined(__ARM_FEATURE_SME) && defined(__ARM_FEATURE_SVE)
20 #define ATTR __arm_streaming_compatible
21 #elif defined(__ARM_FEATURE_SME)
22 #define ATTR __arm_streaming
23 #else
24 #define ATTR
25 #endif
26
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 //
37 svint64_t test_svrax1_s64(svint64_t op1, svint64_t op2) ATTR
38 {
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 //
52 svuint64_t test_svrax1_u64(svuint64_t op1, svuint64_t op2) ATTR
53 {
54 return SVE_ACLE_FUNC(svrax1,_u64,,)(op1, op2);
55 }