49 lines · c
1// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 42// RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +sve2 -target-feature +sve2p1 -O2 -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s3// RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +sve2 -target-feature +sve2p1 -O2 -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK4// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -target-feature +sme2 -O2 -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s5// RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +sme -target-feature +sme2 -O2 -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s6// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -target-feature +sve -target-feature +sve2 -target-feature +sve2p1 -O2 -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s7// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -target-feature +sme2 -O2 -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK8// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -target-feature +sme2 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s9 10// REQUIRES: aarch64-registered-target11 12#include <arm_sve.h>13 14#if defined(__ARM_FEATURE_SME) && defined(__ARM_FEATURE_SVE)15#define MODE_ATTR __arm_streaming_compatible16#elif defined(__ARM_FEATURE_SME)17#define MODE_ATTR __arm_streaming18#else19#define MODE_ATTR20#endif21 22// CHECK-LABEL: define dso_local { <vscale x 16 x i1>, <vscale x 16 x i1> } @test_svundef2_b(23// CHECK-SAME: ) local_unnamed_addr #[[ATTR0:[0-9]+]] {24// CHECK-NEXT: entry:25// CHECK-NEXT: ret { <vscale x 16 x i1>, <vscale x 16 x i1> } undef26//27// CPP-CHECK-LABEL: define dso_local { <vscale x 16 x i1>, <vscale x 16 x i1> } @_Z15test_svundef2_bv(28// CPP-CHECK-SAME: ) local_unnamed_addr #[[ATTR0:[0-9]+]] {29// CPP-CHECK-NEXT: entry:30// CPP-CHECK-NEXT: ret { <vscale x 16 x i1>, <vscale x 16 x i1> } undef31//32svboolx2_t test_svundef2_b(void) MODE_ATTR {33 return svundef2_b();34}35 36// CHECK-LABEL: define dso_local { <vscale x 16 x i1>, <vscale x 16 x i1>, <vscale x 16 x i1>, <vscale x 16 x i1> } @test_svundef4_b(37// CHECK-SAME: ) local_unnamed_addr #[[ATTR0]] {38// CHECK-NEXT: entry:39// CHECK-NEXT: ret { <vscale x 16 x i1>, <vscale x 16 x i1>, <vscale x 16 x i1>, <vscale x 16 x i1> } undef40//41// CPP-CHECK-LABEL: define dso_local { <vscale x 16 x i1>, <vscale x 16 x i1>, <vscale x 16 x i1>, <vscale x 16 x i1> } @_Z15test_svundef4_bv(42// CPP-CHECK-SAME: ) local_unnamed_addr #[[ATTR0]] {43// CPP-CHECK-NEXT: entry:44// CPP-CHECK-NEXT: ret { <vscale x 16 x i1>, <vscale x 16 x i1>, <vscale x 16 x i1>, <vscale x 16 x i1> } undef45//46svboolx4_t test_svundef4_b(void) MODE_ATTR {47 return svundef4_b();48}49