Skip to content

Commit 615dd43

Browse files
committed
Fixups
1 parent 1f6b395 commit 615dd43

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

clang/test/CodeGenCXX/aarch64-sve-vector-init.cpp

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 2
22
// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64-none-linux-gnu -target-feature +sve -emit-llvm -o - %s | FileCheck %s
33

4-
#include <arm_sve.h>
5-
64
// CHECK-LABEL: define dso_local void @_Z11test_localsv
75
// CHECK-SAME: () #[[ATTR0:[0-9]+]] {
86
// CHECK-NEXT: entry:
@@ -1215,21 +1213,19 @@ void test_copy_mf8x4(__clang_svmfloat8x4_t a) {
12151213
__clang_svmfloat8x4_t b{a};
12161214
}
12171215

1218-
using vec_t = svint8_t;
1219-
1220-
/// From: https://github.com/llvm/llvm-project/issues/107609
1221-
/// The type of `vec` is a typedef of svint8_t, while svdup_s8 returns the non-typedef'd type.
1216+
/// Reduced from: https://github.com/llvm/llvm-project/issues/107609
1217+
using vec_t = __SVInt8_t;
12221218

1223-
// CHECK-LABEL: define dso_local <vscale x 16 x i8> @_Z20sve_init_dup_typedefv
1224-
// CHECK-SAME: () #[[ATTR0:[0-9]+]] {
1219+
// CHECK-LABEL: define dso_local void @_Z20test_copy_s8_typedefu10__SVInt8_t
1220+
// CHECK-SAME: (<vscale x 16 x i8> [[A:%.*]]) #[[ATTR0]] {
12251221
// CHECK-NEXT: entry:
1222+
// CHECK-NEXT: [[A_ADDR:%.*]] = alloca <vscale x 16 x i8>, align 16
12261223
// CHECK-NEXT: [[VEC:%.*]] = alloca <vscale x 16 x i8>, align 16
1227-
// CHECK-NEXT: [[TMP0:%.*]] = call <vscale x 16 x i8> @llvm.aarch64.sve.dup.x.nxv16i8(i8 2)
1224+
// CHECK-NEXT: store <vscale x 16 x i8> [[A]], ptr [[A_ADDR]], align 16
1225+
// CHECK-NEXT: [[TMP0:%.*]] = load <vscale x 16 x i8>, ptr [[A_ADDR]], align 16
12281226
// CHECK-NEXT: store <vscale x 16 x i8> [[TMP0]], ptr [[VEC]], align 16
1229-
// CHECK-NEXT: [[TMP1:%.*]] = load <vscale x 16 x i8>, ptr [[VEC]], align 16
1230-
// CHECK-NEXT: ret <vscale x 16 x i8> [[TMP1]]
1227+
// CHECK-NEXT: ret void
12311228
//
1232-
vec_t sve_init_dup_typedef() {
1233-
vec_t vec{svdup_s8(2)};
1234-
return vec;
1229+
void test_copy_s8_typedef(__SVInt8_t a) {
1230+
vec_t vec{a};
12351231
}

0 commit comments

Comments
 (0)