Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / CodeGen / AArch64 / sve-intrinsics / acle_sve_undef.c
blob7daeb7489e5c47361c28fd1da498dec24e0c5375
1 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
2 // REQUIRES: aarch64-registered-target
3 // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s
4 // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK
5 // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -S -disable-O0-optnone -Werror -o /dev/null %s
6 // RUN: %clang_cc1 -triple aarch64 -target-feature +sme -S -disable-O0-optnone -Werror -o /dev/null %s
8 #include <arm_sve.h>
10 #if defined __ARM_FEATURE_SME
11 #define MODE_ATTR __arm_streaming
12 #else
13 #define MODE_ATTR
14 #endif
16 // CHECK-LABEL: @test_svundef_s8(
17 // CHECK-NEXT: entry:
18 // CHECK-NEXT: ret <vscale x 16 x i8> undef
20 // CPP-CHECK-LABEL: @_Z15test_svundef_s8v(
21 // CPP-CHECK-NEXT: entry:
22 // CPP-CHECK-NEXT: ret <vscale x 16 x i8> undef
24 svint8_t test_svundef_s8(void) MODE_ATTR
26 return svundef_s8();
29 // CHECK-LABEL: @test_svundef_s16(
30 // CHECK-NEXT: entry:
31 // CHECK-NEXT: ret <vscale x 8 x i16> undef
33 // CPP-CHECK-LABEL: @_Z16test_svundef_s16v(
34 // CPP-CHECK-NEXT: entry:
35 // CPP-CHECK-NEXT: ret <vscale x 8 x i16> undef
37 svint16_t test_svundef_s16(void) MODE_ATTR
39 return svundef_s16();
42 // CHECK-LABEL: @test_svundef_s32(
43 // CHECK-NEXT: entry:
44 // CHECK-NEXT: ret <vscale x 4 x i32> undef
46 // CPP-CHECK-LABEL: @_Z16test_svundef_s32v(
47 // CPP-CHECK-NEXT: entry:
48 // CPP-CHECK-NEXT: ret <vscale x 4 x i32> undef
50 svint32_t test_svundef_s32(void) MODE_ATTR
52 return svundef_s32();
55 // CHECK-LABEL: @test_svundef_s64(
56 // CHECK-NEXT: entry:
57 // CHECK-NEXT: ret <vscale x 2 x i64> undef
59 // CPP-CHECK-LABEL: @_Z16test_svundef_s64v(
60 // CPP-CHECK-NEXT: entry:
61 // CPP-CHECK-NEXT: ret <vscale x 2 x i64> undef
63 svint64_t test_svundef_s64(void) MODE_ATTR
65 return svundef_s64();
68 // CHECK-LABEL: @test_svundef_u8(
69 // CHECK-NEXT: entry:
70 // CHECK-NEXT: ret <vscale x 16 x i8> undef
72 // CPP-CHECK-LABEL: @_Z15test_svundef_u8v(
73 // CPP-CHECK-NEXT: entry:
74 // CPP-CHECK-NEXT: ret <vscale x 16 x i8> undef
76 svuint8_t test_svundef_u8(void) MODE_ATTR
78 return svundef_u8();
81 // CHECK-LABEL: @test_svundef_u16(
82 // CHECK-NEXT: entry:
83 // CHECK-NEXT: ret <vscale x 8 x i16> undef
85 // CPP-CHECK-LABEL: @_Z16test_svundef_u16v(
86 // CPP-CHECK-NEXT: entry:
87 // CPP-CHECK-NEXT: ret <vscale x 8 x i16> undef
89 svuint16_t test_svundef_u16(void) MODE_ATTR
91 return svundef_u16();
94 // CHECK-LABEL: @test_svundef_u32(
95 // CHECK-NEXT: entry:
96 // CHECK-NEXT: ret <vscale x 4 x i32> undef
98 // CPP-CHECK-LABEL: @_Z16test_svundef_u32v(
99 // CPP-CHECK-NEXT: entry:
100 // CPP-CHECK-NEXT: ret <vscale x 4 x i32> undef
102 svuint32_t test_svundef_u32(void) MODE_ATTR
104 return svundef_u32();
107 // CHECK-LABEL: @test_svundef_u64(
108 // CHECK-NEXT: entry:
109 // CHECK-NEXT: ret <vscale x 2 x i64> undef
111 // CPP-CHECK-LABEL: @_Z16test_svundef_u64v(
112 // CPP-CHECK-NEXT: entry:
113 // CPP-CHECK-NEXT: ret <vscale x 2 x i64> undef
115 svuint64_t test_svundef_u64(void) MODE_ATTR
117 return svundef_u64();
120 // CHECK-LABEL: @test_svundef_f16(
121 // CHECK-NEXT: entry:
122 // CHECK-NEXT: ret <vscale x 8 x half> undef
124 // CPP-CHECK-LABEL: @_Z16test_svundef_f16v(
125 // CPP-CHECK-NEXT: entry:
126 // CPP-CHECK-NEXT: ret <vscale x 8 x half> undef
128 svfloat16_t test_svundef_f16(void) MODE_ATTR
130 return svundef_f16();
133 // CHECK-LABEL: @test_svundef_f32(
134 // CHECK-NEXT: entry:
135 // CHECK-NEXT: ret <vscale x 4 x float> undef
137 // CPP-CHECK-LABEL: @_Z16test_svundef_f32v(
138 // CPP-CHECK-NEXT: entry:
139 // CPP-CHECK-NEXT: ret <vscale x 4 x float> undef
141 svfloat32_t test_svundef_f32(void) MODE_ATTR
143 return svundef_f32();
146 // CHECK-LABEL: @test_svundef_f64(
147 // CHECK-NEXT: entry:
148 // CHECK-NEXT: ret <vscale x 2 x double> undef
150 // CPP-CHECK-LABEL: @_Z16test_svundef_f64v(
151 // CPP-CHECK-NEXT: entry:
152 // CPP-CHECK-NEXT: ret <vscale x 2 x double> undef
154 svfloat64_t test_svundef_f64(void) MODE_ATTR
156 return svundef_f64();