1 // REQUIRES: aarch64-registered-target 2 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -fallow-half-arguments-and-returns -S -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s 3 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -fallow-half-arguments-and-returns -S -O1 -Werror -Wall -emit-llvm -o - -x c++ %s | FileCheck %s 4 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -fallow-half-arguments-and-returns -S -O1 -Werror -o - %s >/dev/null 5 #include <arm_sve.h> 6 test_svundef_s8()7svint8_t test_svundef_s8() 8 { 9 // CHECK-LABEL: test_svundef_s8 10 // CHECK: ret <vscale x 16 x i8> undef 11 return svundef_s8(); 12 } 13 test_svundef_s16()14svint16_t test_svundef_s16() 15 { 16 // CHECK-LABEL: test_svundef_s16 17 // CHECK: ret <vscale x 8 x i16> undef 18 return svundef_s16(); 19 } 20 test_svundef_s32()21svint32_t test_svundef_s32() 22 { 23 // CHECK-LABEL: test_svundef_s32 24 // CHECK: ret <vscale x 4 x i32> undef 25 return svundef_s32(); 26 } 27 test_svundef_s64()28svint64_t test_svundef_s64() 29 { 30 // CHECK-LABEL: test_svundef_s64 31 // CHECK: ret <vscale x 2 x i64> undef 32 return svundef_s64(); 33 } 34 test_svundef_u8()35svuint8_t test_svundef_u8() 36 { 37 // CHECK-LABEL: test_svundef_u8 38 // CHECK: ret <vscale x 16 x i8> undef 39 return svundef_u8(); 40 } 41 test_svundef_u16()42svuint16_t test_svundef_u16() 43 { 44 // CHECK-LABEL: test_svundef_u16 45 // CHECK: ret <vscale x 8 x i16> undef 46 return svundef_u16(); 47 } 48 test_svundef_u32()49svuint32_t test_svundef_u32() 50 { 51 // CHECK-LABEL: test_svundef_u32 52 // CHECK: ret <vscale x 4 x i32> undef 53 return svundef_u32(); 54 } 55 test_svundef_u64()56svuint64_t test_svundef_u64() 57 { 58 // CHECK-LABEL: test_svundef_u64 59 // CHECK: ret <vscale x 2 x i64> undef 60 return svundef_u64(); 61 } 62 test_svundef_f16()63svfloat16_t test_svundef_f16() 64 { 65 // CHECK-LABEL: test_svundef_f16 66 // CHECK: ret <vscale x 8 x half> undef 67 return svundef_f16(); 68 } 69 test_svundef_f32()70svfloat32_t test_svundef_f32() 71 { 72 // CHECK-LABEL: test_svundef_f32 73 // CHECK: ret <vscale x 4 x float> undef 74 return svundef_f32(); 75 } 76 test_svundef_f64()77svfloat64_t test_svundef_f64() 78 { 79 // CHECK-LABEL: test_svundef_f64 80 // CHECK: ret <vscale x 2 x double> undef 81 return svundef_f64(); 82 } 83