75 lines · c
1// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py2// 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 %s4// 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-CHECK6// 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 %s8// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -target-feature +sme2 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s \9// RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s10// RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +sme -target-feature +sme2 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s \11// RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s12// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -target-feature +sve -target-feature +sve2 -target-feature +sve2p1 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s \13// RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s14// 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\15// RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK16// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -target-feature +sme2 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s \17// RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK18// RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +sve2 -target-feature +sve2p1 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s19// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -target-feature +sme2 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s20// REQUIRES: aarch64-registered-target21#include <arm_sve.h>22 23#ifdef SVE_OVERLOADED_FORMS24// A simple used,unused... macro, long enough to represent any SVE builtin.25#define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A326#else27#define SVE_ACLE_FUNC(A1,A2,A3,A4) A1##A2##A3##A428#endif29 30#if defined(__ARM_FEATURE_SME) && defined(__ARM_FEATURE_SVE)31#define ATTR __arm_streaming_compatible32#elif defined(__ARM_FEATURE_SME)33#define ATTR __arm_streaming34#else35#define ATTR36#endif37 38// CHECK-LABEL: @test_svget2_b_0(39// CHECK-NEXT: entry:40// CHECK-NEXT: [[TMP0:%.*]] = insertvalue { <vscale x 16 x i1>, <vscale x 16 x i1> } poison, <vscale x 16 x i1> [[TUPLE_COERCE0:%.*]], 041// CHECK-NEXT: [[TMP1:%.*]] = insertvalue { <vscale x 16 x i1>, <vscale x 16 x i1> } [[TMP0]], <vscale x 16 x i1> [[TUPLE_COERCE1:%.*]], 142// CHECK-NEXT: [[TMP2:%.*]] = extractvalue { <vscale x 16 x i1>, <vscale x 16 x i1> } [[TMP1]], 043// CHECK-NEXT: ret <vscale x 16 x i1> [[TMP2]]44//45// CPP-CHECK-LABEL: @_Z15test_svget2_b_010svboolx2_t(46// CPP-CHECK-NEXT: entry:47// CPP-CHECK-NEXT: [[TMP0:%.*]] = insertvalue { <vscale x 16 x i1>, <vscale x 16 x i1> } poison, <vscale x 16 x i1> [[TUPLE_COERCE0:%.*]], 048// CPP-CHECK-NEXT: [[TMP1:%.*]] = insertvalue { <vscale x 16 x i1>, <vscale x 16 x i1> } [[TMP0]], <vscale x 16 x i1> [[TUPLE_COERCE1:%.*]], 149// CPP-CHECK-NEXT: [[TMP2:%.*]] = extractvalue { <vscale x 16 x i1>, <vscale x 16 x i1> } [[TMP1]], 050// CPP-CHECK-NEXT: ret <vscale x 16 x i1> [[TMP2]]51//52svbool_t test_svget2_b_0(svboolx2_t tuple) ATTR53{54 return SVE_ACLE_FUNC(svget2,_b,,)(tuple, 0);55}56 57// CHECK-LABEL: @test_svget2_b_1(58// CHECK-NEXT: entry:59// CHECK-NEXT: [[TMP0:%.*]] = insertvalue { <vscale x 16 x i1>, <vscale x 16 x i1> } poison, <vscale x 16 x i1> [[TUPLE_COERCE0:%.*]], 060// CHECK-NEXT: [[TMP1:%.*]] = insertvalue { <vscale x 16 x i1>, <vscale x 16 x i1> } [[TMP0]], <vscale x 16 x i1> [[TUPLE_COERCE1:%.*]], 161// CHECK-NEXT: [[TMP2:%.*]] = extractvalue { <vscale x 16 x i1>, <vscale x 16 x i1> } [[TMP1]], 162// CHECK-NEXT: ret <vscale x 16 x i1> [[TMP2]]63//64// CPP-CHECK-LABEL: @_Z15test_svget2_b_110svboolx2_t(65// CPP-CHECK-NEXT: entry:66// CPP-CHECK-NEXT: [[TMP0:%.*]] = insertvalue { <vscale x 16 x i1>, <vscale x 16 x i1> } poison, <vscale x 16 x i1> [[TUPLE_COERCE0:%.*]], 067// CPP-CHECK-NEXT: [[TMP1:%.*]] = insertvalue { <vscale x 16 x i1>, <vscale x 16 x i1> } [[TMP0]], <vscale x 16 x i1> [[TUPLE_COERCE1:%.*]], 168// CPP-CHECK-NEXT: [[TMP2:%.*]] = extractvalue { <vscale x 16 x i1>, <vscale x 16 x i1> } [[TMP1]], 169// CPP-CHECK-NEXT: ret <vscale x 16 x i1> [[TMP2]]70//71svbool_t test_svget2_b_1(svboolx2_t tuple) ATTR72{73 return SVE_ACLE_FUNC(svget2,_b,,)(tuple, 1);74}75