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 -o - %s >/dev/null 2>%t 4 // RUN: FileCheck --check-prefix=ASM --allow-empty %s <%t 5 6 // If this check fails please read test/CodeGen/aarch64-sve-intrinsics/README for instructions on how to resolve it. 7 // ASM-NOT: warning 8 #include <arm_sve.h> 9 test_svundef_s8()10svint8_t test_svundef_s8() 11 { 12 // CHECK-LABEL: test_svundef_s8 13 // CHECK: ret <vscale x 16 x i8> undef 14 return svundef_s8(); 15 } 16 test_svundef_s16()17svint16_t test_svundef_s16() 18 { 19 // CHECK-LABEL: test_svundef_s16 20 // CHECK: ret <vscale x 8 x i16> undef 21 return svundef_s16(); 22 } 23 test_svundef_s32()24svint32_t test_svundef_s32() 25 { 26 // CHECK-LABEL: test_svundef_s32 27 // CHECK: ret <vscale x 4 x i32> undef 28 return svundef_s32(); 29 } 30 test_svundef_s64()31svint64_t test_svundef_s64() 32 { 33 // CHECK-LABEL: test_svundef_s64 34 // CHECK: ret <vscale x 2 x i64> undef 35 return svundef_s64(); 36 } 37 test_svundef_u8()38svuint8_t test_svundef_u8() 39 { 40 // CHECK-LABEL: test_svundef_u8 41 // CHECK: ret <vscale x 16 x i8> undef 42 return svundef_u8(); 43 } 44 test_svundef_u16()45svuint16_t test_svundef_u16() 46 { 47 // CHECK-LABEL: test_svundef_u16 48 // CHECK: ret <vscale x 8 x i16> undef 49 return svundef_u16(); 50 } 51 test_svundef_u32()52svuint32_t test_svundef_u32() 53 { 54 // CHECK-LABEL: test_svundef_u32 55 // CHECK: ret <vscale x 4 x i32> undef 56 return svundef_u32(); 57 } 58 test_svundef_u64()59svuint64_t test_svundef_u64() 60 { 61 // CHECK-LABEL: test_svundef_u64 62 // CHECK: ret <vscale x 2 x i64> undef 63 return svundef_u64(); 64 } 65 test_svundef_f16()66svfloat16_t test_svundef_f16() 67 { 68 // CHECK-LABEL: test_svundef_f16 69 // CHECK: ret <vscale x 8 x half> undef 70 return svundef_f16(); 71 } 72 test_svundef_f32()73svfloat32_t test_svundef_f32() 74 { 75 // CHECK-LABEL: test_svundef_f32 76 // CHECK: ret <vscale x 4 x float> undef 77 return svundef_f32(); 78 } 79 test_svundef_f64()80svfloat64_t test_svundef_f64() 81 { 82 // CHECK-LABEL: test_svundef_f64 83 // CHECK: ret <vscale x 2 x double> undef 84 return svundef_f64(); 85 } 86