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 -O2 -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s
4 // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -O2 -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK
5 // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s
6 // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sme -target-feature +bf16 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s
10 #if defined __ARM_FEATURE_SME
11 #define MODE_ATTR __arm_streaming
17 // CHECK-LABEL: @test_svundef3_s8(
19 // CHECK-NEXT: ret { <vscale x 16 x i8>, <vscale x 16 x i8>, <vscale x 16 x i8> } undef
21 // CPP-CHECK-LABEL: @_Z16test_svundef3_s8v(
22 // CPP-CHECK-NEXT: entry:
23 // CPP-CHECK-NEXT: ret { <vscale x 16 x i8>, <vscale x 16 x i8>, <vscale x 16 x i8> } undef
25 svint8x3_t
test_svundef3_s8(void) MODE_ATTR
30 // CHECK-LABEL: @test_svundef3_s16(
32 // CHECK-NEXT: ret { <vscale x 8 x i16>, <vscale x 8 x i16>, <vscale x 8 x i16> } undef
34 // CPP-CHECK-LABEL: @_Z17test_svundef3_s16v(
35 // CPP-CHECK-NEXT: entry:
36 // CPP-CHECK-NEXT: ret { <vscale x 8 x i16>, <vscale x 8 x i16>, <vscale x 8 x i16> } undef
38 svint16x3_t
test_svundef3_s16(void) MODE_ATTR
40 return svundef3_s16();
43 // CHECK-LABEL: @test_svundef3_s32(
45 // CHECK-NEXT: ret { <vscale x 4 x i32>, <vscale x 4 x i32>, <vscale x 4 x i32> } undef
47 // CPP-CHECK-LABEL: @_Z17test_svundef3_s32v(
48 // CPP-CHECK-NEXT: entry:
49 // CPP-CHECK-NEXT: ret { <vscale x 4 x i32>, <vscale x 4 x i32>, <vscale x 4 x i32> } undef
51 svint32x3_t
test_svundef3_s32(void) MODE_ATTR
53 return svundef3_s32();
56 // CHECK-LABEL: @test_svundef3_s64(
58 // CHECK-NEXT: ret { <vscale x 2 x i64>, <vscale x 2 x i64>, <vscale x 2 x i64> } undef
60 // CPP-CHECK-LABEL: @_Z17test_svundef3_s64v(
61 // CPP-CHECK-NEXT: entry:
62 // CPP-CHECK-NEXT: ret { <vscale x 2 x i64>, <vscale x 2 x i64>, <vscale x 2 x i64> } undef
64 svint64x3_t
test_svundef3_s64(void) MODE_ATTR
66 return svundef3_s64();
69 // CHECK-LABEL: @test_svundef3_u8(
71 // CHECK-NEXT: ret { <vscale x 16 x i8>, <vscale x 16 x i8>, <vscale x 16 x i8> } undef
73 // CPP-CHECK-LABEL: @_Z16test_svundef3_u8v(
74 // CPP-CHECK-NEXT: entry:
75 // CPP-CHECK-NEXT: ret { <vscale x 16 x i8>, <vscale x 16 x i8>, <vscale x 16 x i8> } undef
77 svuint8x3_t
test_svundef3_u8(void) MODE_ATTR
82 // CHECK-LABEL: @test_svundef3_u16(
84 // CHECK-NEXT: ret { <vscale x 8 x i16>, <vscale x 8 x i16>, <vscale x 8 x i16> } undef
86 // CPP-CHECK-LABEL: @_Z17test_svundef3_u16v(
87 // CPP-CHECK-NEXT: entry:
88 // CPP-CHECK-NEXT: ret { <vscale x 8 x i16>, <vscale x 8 x i16>, <vscale x 8 x i16> } undef
90 svuint16x3_t
test_svundef3_u16(void) MODE_ATTR
92 return svundef3_u16();
95 // CHECK-LABEL: @test_svundef3_u32(
97 // CHECK-NEXT: ret { <vscale x 4 x i32>, <vscale x 4 x i32>, <vscale x 4 x i32> } undef
99 // CPP-CHECK-LABEL: @_Z17test_svundef3_u32v(
100 // CPP-CHECK-NEXT: entry:
101 // CPP-CHECK-NEXT: ret { <vscale x 4 x i32>, <vscale x 4 x i32>, <vscale x 4 x i32> } undef
103 svuint32x3_t
test_svundef3_u32(void) MODE_ATTR
105 return svundef3_u32();
108 // CHECK-LABEL: @test_svundef3_u64(
109 // CHECK-NEXT: entry:
110 // CHECK-NEXT: ret { <vscale x 2 x i64>, <vscale x 2 x i64>, <vscale x 2 x i64> } undef
112 // CPP-CHECK-LABEL: @_Z17test_svundef3_u64v(
113 // CPP-CHECK-NEXT: entry:
114 // CPP-CHECK-NEXT: ret { <vscale x 2 x i64>, <vscale x 2 x i64>, <vscale x 2 x i64> } undef
116 svuint64x3_t
test_svundef3_u64(void) MODE_ATTR
118 return svundef3_u64();
121 // CHECK-LABEL: @test_svundef3_f16(
122 // CHECK-NEXT: entry:
123 // CHECK-NEXT: ret { <vscale x 8 x half>, <vscale x 8 x half>, <vscale x 8 x half> } undef
125 // CPP-CHECK-LABEL: @_Z17test_svundef3_f16v(
126 // CPP-CHECK-NEXT: entry:
127 // CPP-CHECK-NEXT: ret { <vscale x 8 x half>, <vscale x 8 x half>, <vscale x 8 x half> } undef
129 svfloat16x3_t
test_svundef3_f16(void) MODE_ATTR
131 return svundef3_f16();
134 // CHECK-LABEL: @test_svundef3_f32(
135 // CHECK-NEXT: entry:
136 // CHECK-NEXT: ret { <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float> } undef
138 // CPP-CHECK-LABEL: @_Z17test_svundef3_f32v(
139 // CPP-CHECK-NEXT: entry:
140 // CPP-CHECK-NEXT: ret { <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float> } undef
142 svfloat32x3_t
test_svundef3_f32(void) MODE_ATTR
144 return svundef3_f32();
147 // CHECK-LABEL: @test_svundef3_f64(
148 // CHECK-NEXT: entry:
149 // CHECK-NEXT: ret { <vscale x 2 x double>, <vscale x 2 x double>, <vscale x 2 x double> } undef
151 // CPP-CHECK-LABEL: @_Z17test_svundef3_f64v(
152 // CPP-CHECK-NEXT: entry:
153 // CPP-CHECK-NEXT: ret { <vscale x 2 x double>, <vscale x 2 x double>, <vscale x 2 x double> } undef
155 svfloat64x3_t
test_svundef3_f64(void) MODE_ATTR
157 return svundef3_f64();