185 lines · c
1// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py2// REQUIRES: aarch64-registered-target3// RUN: %clang_cc1 -triple aarch64 -target-feature +sve -O2 -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s4// RUN: %clang_cc1 -triple aarch64 -target-feature +sve -O2 -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK5// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s6// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -Wall -o /dev/null %s7 8#include <arm_sve.h>9 10#if defined __ARM_FEATURE_SME11#define MODE_ATTR __arm_streaming12#else13#define MODE_ATTR14#endif15 16 17// CHECK-LABEL: @test_svundef2_s8(18// CHECK-NEXT: entry:19// CHECK-NEXT: ret { <vscale x 16 x i8>, <vscale x 16 x i8> } undef20//21// CPP-CHECK-LABEL: @_Z16test_svundef2_s8v(22// CPP-CHECK-NEXT: entry:23// CPP-CHECK-NEXT: ret { <vscale x 16 x i8>, <vscale x 16 x i8> } undef24//25svint8x2_t test_svundef2_s8(void) MODE_ATTR26{27 return svundef2_s8();28}29 30// CHECK-LABEL: @test_svundef2_s16(31// CHECK-NEXT: entry:32// CHECK-NEXT: ret { <vscale x 8 x i16>, <vscale x 8 x i16> } undef33//34// CPP-CHECK-LABEL: @_Z17test_svundef2_s16v(35// CPP-CHECK-NEXT: entry:36// CPP-CHECK-NEXT: ret { <vscale x 8 x i16>, <vscale x 8 x i16> } undef37//38svint16x2_t test_svundef2_s16(void) MODE_ATTR39{40 return svundef2_s16();41}42 43// CHECK-LABEL: @test_svundef2_s32(44// CHECK-NEXT: entry:45// CHECK-NEXT: ret { <vscale x 4 x i32>, <vscale x 4 x i32> } undef46//47// CPP-CHECK-LABEL: @_Z17test_svundef2_s32v(48// CPP-CHECK-NEXT: entry:49// CPP-CHECK-NEXT: ret { <vscale x 4 x i32>, <vscale x 4 x i32> } undef50//51svint32x2_t test_svundef2_s32(void) MODE_ATTR52{53 return svundef2_s32();54}55 56// CHECK-LABEL: @test_svundef2_s64(57// CHECK-NEXT: entry:58// CHECK-NEXT: ret { <vscale x 2 x i64>, <vscale x 2 x i64> } undef59//60// CPP-CHECK-LABEL: @_Z17test_svundef2_s64v(61// CPP-CHECK-NEXT: entry:62// CPP-CHECK-NEXT: ret { <vscale x 2 x i64>, <vscale x 2 x i64> } undef63//64svint64x2_t test_svundef2_s64(void) MODE_ATTR65{66 return svundef2_s64();67}68 69// CHECK-LABEL: @test_svundef2_u8(70// CHECK-NEXT: entry:71// CHECK-NEXT: ret { <vscale x 16 x i8>, <vscale x 16 x i8> } undef72//73// CPP-CHECK-LABEL: @_Z16test_svundef2_u8v(74// CPP-CHECK-NEXT: entry:75// CPP-CHECK-NEXT: ret { <vscale x 16 x i8>, <vscale x 16 x i8> } undef76//77svuint8x2_t test_svundef2_u8(void) MODE_ATTR78{79 return svundef2_u8();80}81 82// CHECK-LABEL: @test_svundef2_u16(83// CHECK-NEXT: entry:84// CHECK-NEXT: ret { <vscale x 8 x i16>, <vscale x 8 x i16> } undef85//86// CPP-CHECK-LABEL: @_Z17test_svundef2_u16v(87// CPP-CHECK-NEXT: entry:88// CPP-CHECK-NEXT: ret { <vscale x 8 x i16>, <vscale x 8 x i16> } undef89//90svuint16x2_t test_svundef2_u16(void) MODE_ATTR91{92 return svundef2_u16();93}94 95// CHECK-LABEL: @test_svundef2_u32(96// CHECK-NEXT: entry:97// CHECK-NEXT: ret { <vscale x 4 x i32>, <vscale x 4 x i32> } undef98//99// CPP-CHECK-LABEL: @_Z17test_svundef2_u32v(100// CPP-CHECK-NEXT: entry:101// CPP-CHECK-NEXT: ret { <vscale x 4 x i32>, <vscale x 4 x i32> } undef102//103svuint32x2_t test_svundef2_u32(void) MODE_ATTR104{105 return svundef2_u32();106}107 108// CHECK-LABEL: @test_svundef2_u64(109// CHECK-NEXT: entry:110// CHECK-NEXT: ret { <vscale x 2 x i64>, <vscale x 2 x i64> } undef111//112// CPP-CHECK-LABEL: @_Z17test_svundef2_u64v(113// CPP-CHECK-NEXT: entry:114// CPP-CHECK-NEXT: ret { <vscale x 2 x i64>, <vscale x 2 x i64> } undef115//116svuint64x2_t test_svundef2_u64(void) MODE_ATTR117{118 return svundef2_u64();119}120 121// CHECK-LABEL: @test_svundef2_f16(122// CHECK-NEXT: entry:123// CHECK-NEXT: ret { <vscale x 8 x half>, <vscale x 8 x half> } undef124//125// CPP-CHECK-LABEL: @_Z17test_svundef2_f16v(126// CPP-CHECK-NEXT: entry:127// CPP-CHECK-NEXT: ret { <vscale x 8 x half>, <vscale x 8 x half> } undef128//129svfloat16x2_t test_svundef2_f16(void) MODE_ATTR130{131 return svundef2_f16();132}133 134// CHECK-LABEL: @test_svundef2_f32(135// CHECK-NEXT: entry:136// CHECK-NEXT: ret { <vscale x 4 x float>, <vscale x 4 x float> } undef137//138// CPP-CHECK-LABEL: @_Z17test_svundef2_f32v(139// CPP-CHECK-NEXT: entry:140// CPP-CHECK-NEXT: ret { <vscale x 4 x float>, <vscale x 4 x float> } undef141//142svfloat32x2_t test_svundef2_f32(void) MODE_ATTR143{144 return svundef2_f32();145}146 147// CHECK-LABEL: @test_svundef2_f64(148// CHECK-NEXT: entry:149// CHECK-NEXT: ret { <vscale x 2 x double>, <vscale x 2 x double> } undef150//151// CPP-CHECK-LABEL: @_Z17test_svundef2_f64v(152// CPP-CHECK-NEXT: entry:153// CPP-CHECK-NEXT: ret { <vscale x 2 x double>, <vscale x 2 x double> } undef154//155svfloat64x2_t test_svundef2_f64(void) MODE_ATTR156{157 return svundef2_f64();158}159 160// CHECK-LABEL: @test_svundef2_mf8(161// CHECK-NEXT: entry:162// CHECK-NEXT: ret { <vscale x 16 x i8>, <vscale x 16 x i8> } undef163//164// CPP-CHECK-LABEL: @_Z17test_svundef2_mf8v(165// CPP-CHECK-NEXT: entry:166// CPP-CHECK-NEXT: ret { <vscale x 16 x i8>, <vscale x 16 x i8> } undef167//168svmfloat8x2_t test_svundef2_mf8(void) MODE_ATTR169{170 return svundef2_mf8();171}172 173// CHECK-LABEL: @test_svundef2_bf16(174// CHECK-NEXT: entry:175// CHECK-NEXT: ret { <vscale x 8 x bfloat>, <vscale x 8 x bfloat> } undef176//177// CPP-CHECK-LABEL: @_Z18test_svundef2_bf16v(178// CPP-CHECK-NEXT: entry:179// CPP-CHECK-NEXT: ret { <vscale x 8 x bfloat>, <vscale x 8 x bfloat> } undef180//181svbfloat16x2_t test_svundef2_bf16(void) MODE_ATTR182{183 return svundef2_bf16();184}185