|
1 | 1 | // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 2 |
2 | 2 | // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64-none-linux-gnu -target-feature +sve -emit-llvm -o - %s | FileCheck %s |
3 | 3 |
|
4 | | -#include <arm_sve.h> |
5 | | - |
6 | 4 | // CHECK-LABEL: define dso_local void @_Z11test_localsv |
7 | 5 | // CHECK-SAME: () #[[ATTR0:[0-9]+]] { |
8 | 6 | // CHECK-NEXT: entry: |
@@ -1215,21 +1213,19 @@ void test_copy_mf8x4(__clang_svmfloat8x4_t a) { |
1215 | 1213 | __clang_svmfloat8x4_t b{a}; |
1216 | 1214 | } |
1217 | 1215 |
|
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; |
1222 | 1218 |
|
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]] { |
1225 | 1221 | // CHECK-NEXT: entry: |
| 1222 | +// CHECK-NEXT: [[A_ADDR:%.*]] = alloca <vscale x 16 x i8>, align 16 |
1226 | 1223 | // 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 |
1228 | 1226 | // 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 |
1231 | 1228 | // |
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}; |
1235 | 1231 | } |
0 commit comments