Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGen / aarch64-sve-intrinsics / acle_sve_undef2.c
blob6d64f2efdb1faf0cd01f78b131fa7603b4f4df0f
1 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
2 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -S -O2 -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s
3 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -S -O2 -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK
5 // REQUIRES: aarch64-registered-target
7 #include <arm_sve.h>
9 // CHECK-LABEL: @test_svundef2_s8(
10 // CHECK-NEXT: entry:
11 // CHECK-NEXT: ret <vscale x 32 x i8> undef
13 // CPP-CHECK-LABEL: @_Z16test_svundef2_s8v(
14 // CPP-CHECK-NEXT: entry:
15 // CPP-CHECK-NEXT: ret <vscale x 32 x i8> undef
17 svint8x2_t test_svundef2_s8()
19 return svundef2_s8();
22 // CHECK-LABEL: @test_svundef2_s16(
23 // CHECK-NEXT: entry:
24 // CHECK-NEXT: ret <vscale x 16 x i16> undef
26 // CPP-CHECK-LABEL: @_Z17test_svundef2_s16v(
27 // CPP-CHECK-NEXT: entry:
28 // CPP-CHECK-NEXT: ret <vscale x 16 x i16> undef
30 svint16x2_t test_svundef2_s16()
32 return svundef2_s16();
35 // CHECK-LABEL: @test_svundef2_s32(
36 // CHECK-NEXT: entry:
37 // CHECK-NEXT: ret <vscale x 8 x i32> undef
39 // CPP-CHECK-LABEL: @_Z17test_svundef2_s32v(
40 // CPP-CHECK-NEXT: entry:
41 // CPP-CHECK-NEXT: ret <vscale x 8 x i32> undef
43 svint32x2_t test_svundef2_s32()
45 return svundef2_s32();
48 // CHECK-LABEL: @test_svundef2_s64(
49 // CHECK-NEXT: entry:
50 // CHECK-NEXT: ret <vscale x 4 x i64> undef
52 // CPP-CHECK-LABEL: @_Z17test_svundef2_s64v(
53 // CPP-CHECK-NEXT: entry:
54 // CPP-CHECK-NEXT: ret <vscale x 4 x i64> undef
56 svint64x2_t test_svundef2_s64()
58 return svundef2_s64();
61 // CHECK-LABEL: @test_svundef2_u8(
62 // CHECK-NEXT: entry:
63 // CHECK-NEXT: ret <vscale x 32 x i8> undef
65 // CPP-CHECK-LABEL: @_Z16test_svundef2_u8v(
66 // CPP-CHECK-NEXT: entry:
67 // CPP-CHECK-NEXT: ret <vscale x 32 x i8> undef
69 svuint8x2_t test_svundef2_u8()
71 return svundef2_u8();
74 // CHECK-LABEL: @test_svundef2_u16(
75 // CHECK-NEXT: entry:
76 // CHECK-NEXT: ret <vscale x 16 x i16> undef
78 // CPP-CHECK-LABEL: @_Z17test_svundef2_u16v(
79 // CPP-CHECK-NEXT: entry:
80 // CPP-CHECK-NEXT: ret <vscale x 16 x i16> undef
82 svuint16x2_t test_svundef2_u16()
84 return svundef2_u16();
87 // CHECK-LABEL: @test_svundef2_u32(
88 // CHECK-NEXT: entry:
89 // CHECK-NEXT: ret <vscale x 8 x i32> undef
91 // CPP-CHECK-LABEL: @_Z17test_svundef2_u32v(
92 // CPP-CHECK-NEXT: entry:
93 // CPP-CHECK-NEXT: ret <vscale x 8 x i32> undef
95 svuint32x2_t test_svundef2_u32()
97 return svundef2_u32();
100 // CHECK-LABEL: @test_svundef2_u64(
101 // CHECK-NEXT: entry:
102 // CHECK-NEXT: ret <vscale x 4 x i64> undef
104 // CPP-CHECK-LABEL: @_Z17test_svundef2_u64v(
105 // CPP-CHECK-NEXT: entry:
106 // CPP-CHECK-NEXT: ret <vscale x 4 x i64> undef
108 svuint64x2_t test_svundef2_u64()
110 return svundef2_u64();
113 // CHECK-LABEL: @test_svundef2_f16(
114 // CHECK-NEXT: entry:
115 // CHECK-NEXT: ret <vscale x 16 x half> undef
117 // CPP-CHECK-LABEL: @_Z17test_svundef2_f16v(
118 // CPP-CHECK-NEXT: entry:
119 // CPP-CHECK-NEXT: ret <vscale x 16 x half> undef
121 svfloat16x2_t test_svundef2_f16()
123 return svundef2_f16();
126 // CHECK-LABEL: @test_svundef2_f32(
127 // CHECK-NEXT: entry:
128 // CHECK-NEXT: ret <vscale x 8 x float> undef
130 // CPP-CHECK-LABEL: @_Z17test_svundef2_f32v(
131 // CPP-CHECK-NEXT: entry:
132 // CPP-CHECK-NEXT: ret <vscale x 8 x float> undef
134 svfloat32x2_t test_svundef2_f32()
136 return svundef2_f32();
139 // CHECK-LABEL: @test_svundef2_f64(
140 // CHECK-NEXT: entry:
141 // CHECK-NEXT: ret <vscale x 4 x double> undef
143 // CPP-CHECK-LABEL: @_Z17test_svundef2_f64v(
144 // CPP-CHECK-NEXT: entry:
145 // CPP-CHECK-NEXT: ret <vscale x 4 x double> undef
147 svfloat64x2_t test_svundef2_f64()
149 return svundef2_f64();