Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGen / aarch64-sve-intrinsics / acle_sve_undef.c
blobd92dbd9df0dd51de27ffc83d3fb10c5ff0e9986d
1 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
2 // REQUIRES: aarch64-registered-target
3 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -S -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s
4 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -S -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-none-linux-gnu -target-feature +sve -S -disable-O0-optnone -Werror -o /dev/null %s
6 #include <arm_sve.h>
8 // CHECK-LABEL: @test_svundef_s8(
9 // CHECK-NEXT: entry:
10 // CHECK-NEXT: ret <vscale x 16 x i8> undef
12 // CPP-CHECK-LABEL: @_Z15test_svundef_s8v(
13 // CPP-CHECK-NEXT: entry:
14 // CPP-CHECK-NEXT: ret <vscale x 16 x i8> undef
16 svint8_t test_svundef_s8()
18 return svundef_s8();
21 // CHECK-LABEL: @test_svundef_s16(
22 // CHECK-NEXT: entry:
23 // CHECK-NEXT: ret <vscale x 8 x i16> undef
25 // CPP-CHECK-LABEL: @_Z16test_svundef_s16v(
26 // CPP-CHECK-NEXT: entry:
27 // CPP-CHECK-NEXT: ret <vscale x 8 x i16> undef
29 svint16_t test_svundef_s16()
31 return svundef_s16();
34 // CHECK-LABEL: @test_svundef_s32(
35 // CHECK-NEXT: entry:
36 // CHECK-NEXT: ret <vscale x 4 x i32> undef
38 // CPP-CHECK-LABEL: @_Z16test_svundef_s32v(
39 // CPP-CHECK-NEXT: entry:
40 // CPP-CHECK-NEXT: ret <vscale x 4 x i32> undef
42 svint32_t test_svundef_s32()
44 return svundef_s32();
47 // CHECK-LABEL: @test_svundef_s64(
48 // CHECK-NEXT: entry:
49 // CHECK-NEXT: ret <vscale x 2 x i64> undef
51 // CPP-CHECK-LABEL: @_Z16test_svundef_s64v(
52 // CPP-CHECK-NEXT: entry:
53 // CPP-CHECK-NEXT: ret <vscale x 2 x i64> undef
55 svint64_t test_svundef_s64()
57 return svundef_s64();
60 // CHECK-LABEL: @test_svundef_u8(
61 // CHECK-NEXT: entry:
62 // CHECK-NEXT: ret <vscale x 16 x i8> undef
64 // CPP-CHECK-LABEL: @_Z15test_svundef_u8v(
65 // CPP-CHECK-NEXT: entry:
66 // CPP-CHECK-NEXT: ret <vscale x 16 x i8> undef
68 svuint8_t test_svundef_u8()
70 return svundef_u8();
73 // CHECK-LABEL: @test_svundef_u16(
74 // CHECK-NEXT: entry:
75 // CHECK-NEXT: ret <vscale x 8 x i16> undef
77 // CPP-CHECK-LABEL: @_Z16test_svundef_u16v(
78 // CPP-CHECK-NEXT: entry:
79 // CPP-CHECK-NEXT: ret <vscale x 8 x i16> undef
81 svuint16_t test_svundef_u16()
83 return svundef_u16();
86 // CHECK-LABEL: @test_svundef_u32(
87 // CHECK-NEXT: entry:
88 // CHECK-NEXT: ret <vscale x 4 x i32> undef
90 // CPP-CHECK-LABEL: @_Z16test_svundef_u32v(
91 // CPP-CHECK-NEXT: entry:
92 // CPP-CHECK-NEXT: ret <vscale x 4 x i32> undef
94 svuint32_t test_svundef_u32()
96 return svundef_u32();
99 // CHECK-LABEL: @test_svundef_u64(
100 // CHECK-NEXT: entry:
101 // CHECK-NEXT: ret <vscale x 2 x i64> undef
103 // CPP-CHECK-LABEL: @_Z16test_svundef_u64v(
104 // CPP-CHECK-NEXT: entry:
105 // CPP-CHECK-NEXT: ret <vscale x 2 x i64> undef
107 svuint64_t test_svundef_u64()
109 return svundef_u64();
112 // CHECK-LABEL: @test_svundef_f16(
113 // CHECK-NEXT: entry:
114 // CHECK-NEXT: ret <vscale x 8 x half> undef
116 // CPP-CHECK-LABEL: @_Z16test_svundef_f16v(
117 // CPP-CHECK-NEXT: entry:
118 // CPP-CHECK-NEXT: ret <vscale x 8 x half> undef
120 svfloat16_t test_svundef_f16()
122 return svundef_f16();
125 // CHECK-LABEL: @test_svundef_f32(
126 // CHECK-NEXT: entry:
127 // CHECK-NEXT: ret <vscale x 4 x float> undef
129 // CPP-CHECK-LABEL: @_Z16test_svundef_f32v(
130 // CPP-CHECK-NEXT: entry:
131 // CPP-CHECK-NEXT: ret <vscale x 4 x float> undef
133 svfloat32_t test_svundef_f32()
135 return svundef_f32();
138 // CHECK-LABEL: @test_svundef_f64(
139 // CHECK-NEXT: entry:
140 // CHECK-NEXT: ret <vscale x 2 x double> undef
142 // CPP-CHECK-LABEL: @_Z16test_svundef_f64v(
143 // CPP-CHECK-NEXT: entry:
144 // CPP-CHECK-NEXT: ret <vscale x 2 x double> undef
146 svfloat64_t test_svundef_f64()
148 return svundef_f64();