1 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
2 // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +sve2 -target-feature +sve2p1 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s \
3 // RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s
4 // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +sve2 -target-feature +sve2p1 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s \
5 // RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK
6 // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +sve2 -target-feature +sve2p1 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s \
7 // RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s
8 // RUN: %clang_cc1 -triple aarch64 -target-feature +bf16 -target-feature +sme -target-feature +sme2 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s \
9 // RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s
10 // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +sve2 -target-feature +sve2p1 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s\
11 // RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK
12 // RUN: %clang_cc1 -triple aarch64 -target-feature +bf16 -target-feature +sme -target-feature +sme2 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s \
13 // RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK
14 // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +sve2 -target-feature +sve2p1 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s
15 // RUN: %clang_cc1 -triple aarch64 -target-feature +bf16 -target-feature +sme -target-feature +sme2 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s
16 // REQUIRES: aarch64-registered-target
19 #ifdef SVE_OVERLOADED_FORMS
20 // A simple used,unused... macro, long enough to represent any SVE builtin.
21 #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3
23 #define SVE_ACLE_FUNC(A1,A2,A3,A4) A1##A2##A3##A4
26 #ifdef __ARM_FEATURE_SME
27 #define ATTR __arm_streaming
32 // CHECK-LABEL: @test_svget2_b_0(
34 // CHECK-NEXT: [[TMP0:%.*]] = insertvalue { <vscale x 16 x i1>, <vscale x 16 x i1> } poison, <vscale x 16 x i1> [[TUPLE_COERCE0:%.*]], 0
35 // CHECK-NEXT: [[TMP1:%.*]] = insertvalue { <vscale x 16 x i1>, <vscale x 16 x i1> } [[TMP0]], <vscale x 16 x i1> [[TUPLE_COERCE1:%.*]], 1
36 // CHECK-NEXT: [[TMP2:%.*]] = extractvalue { <vscale x 16 x i1>, <vscale x 16 x i1> } [[TMP1]], 0
37 // CHECK-NEXT: ret <vscale x 16 x i1> [[TMP2]]
39 // CPP-CHECK-LABEL: @_Z15test_svget2_b_010svboolx2_t(
40 // CPP-CHECK-NEXT: entry:
41 // CPP-CHECK-NEXT: [[TMP0:%.*]] = insertvalue { <vscale x 16 x i1>, <vscale x 16 x i1> } poison, <vscale x 16 x i1> [[TUPLE_COERCE0:%.*]], 0
42 // CPP-CHECK-NEXT: [[TMP1:%.*]] = insertvalue { <vscale x 16 x i1>, <vscale x 16 x i1> } [[TMP0]], <vscale x 16 x i1> [[TUPLE_COERCE1:%.*]], 1
43 // CPP-CHECK-NEXT: [[TMP2:%.*]] = extractvalue { <vscale x 16 x i1>, <vscale x 16 x i1> } [[TMP1]], 0
44 // CPP-CHECK-NEXT: ret <vscale x 16 x i1> [[TMP2]]
46 svbool_t
test_svget2_b_0(svboolx2_t tuple
) ATTR
48 return SVE_ACLE_FUNC(svget2
,_b
,,)(tuple
, 0);
51 // CHECK-LABEL: @test_svget2_b_1(
53 // CHECK-NEXT: [[TMP0:%.*]] = insertvalue { <vscale x 16 x i1>, <vscale x 16 x i1> } poison, <vscale x 16 x i1> [[TUPLE_COERCE0:%.*]], 0
54 // CHECK-NEXT: [[TMP1:%.*]] = insertvalue { <vscale x 16 x i1>, <vscale x 16 x i1> } [[TMP0]], <vscale x 16 x i1> [[TUPLE_COERCE1:%.*]], 1
55 // CHECK-NEXT: [[TMP2:%.*]] = extractvalue { <vscale x 16 x i1>, <vscale x 16 x i1> } [[TMP1]], 1
56 // CHECK-NEXT: ret <vscale x 16 x i1> [[TMP2]]
58 // CPP-CHECK-LABEL: @_Z15test_svget2_b_110svboolx2_t(
59 // CPP-CHECK-NEXT: entry:
60 // CPP-CHECK-NEXT: [[TMP0:%.*]] = insertvalue { <vscale x 16 x i1>, <vscale x 16 x i1> } poison, <vscale x 16 x i1> [[TUPLE_COERCE0:%.*]], 0
61 // CPP-CHECK-NEXT: [[TMP1:%.*]] = insertvalue { <vscale x 16 x i1>, <vscale x 16 x i1> } [[TMP0]], <vscale x 16 x i1> [[TUPLE_COERCE1:%.*]], 1
62 // CPP-CHECK-NEXT: [[TMP2:%.*]] = extractvalue { <vscale x 16 x i1>, <vscale x 16 x i1> } [[TMP1]], 1
63 // CPP-CHECK-NEXT: ret <vscale x 16 x i1> [[TMP2]]
65 svbool_t
test_svget2_b_1(svboolx2_t tuple
) ATTR
67 return SVE_ACLE_FUNC(svget2
,_b
,,)(tuple
, 1);