Skip to content

Commit dca432c

Browse files
committed
[SystemZ] Fix naming of vlrlr/vstrlr builtins
The builtins that expand to the vlrl/vlrlr and vstrl/vstrlr instructions are currently named inconsistently between GCC and clang. Rename the clang versions to match GCC.
1 parent c61eb44 commit dca432c

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

clang/include/clang/Basic/BuiltinsSystemZ.def

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,8 @@ TARGET_BUILTIN(__builtin_s390_vfsqdb, "V2dV2d", "nc", "vector")
253253
TARGET_BUILTIN(__builtin_s390_vftcidb, "V2SLLiV2dIii*", "nc", "vector")
254254

255255
// Vector-enhancements facility 1 intrinsics.
256-
TARGET_BUILTIN(__builtin_s390_vlrl, "V16ScUivC*", "", "vector-enhancements-1")
257-
TARGET_BUILTIN(__builtin_s390_vstrl, "vV16ScUiv*", "", "vector-enhancements-1")
256+
TARGET_BUILTIN(__builtin_s390_vlrlr, "V16ScUivC*", "", "vector-enhancements-1")
257+
TARGET_BUILTIN(__builtin_s390_vstrlr, "vV16ScUiv*", "", "vector-enhancements-1")
258258
TARGET_BUILTIN(__builtin_s390_vbperm, "V2ULLiV16UcV16Uc", "nc", "vector-enhancements-1")
259259
TARGET_BUILTIN(__builtin_s390_vmslg, "V16UcV2ULLiV2ULLiV16UcIi", "nc", "vector-enhancements-1")
260260
TARGET_BUILTIN(__builtin_s390_vfmaxdb, "V2dV2dV2dIi", "nc", "vector-enhancements-1")

clang/lib/Headers/vecintrin.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1543,7 +1543,7 @@ vec_load_len(const double *__ptr, unsigned int __len) {
15431543
#if __ARCH__ >= 12
15441544
static inline __ATTRS_ai __vector unsigned char
15451545
vec_load_len_r(const unsigned char *__ptr, unsigned int __len) {
1546-
return (__vector unsigned char)__builtin_s390_vlrl(__len, __ptr);
1546+
return (__vector unsigned char)__builtin_s390_vlrlr(__len, __ptr);
15471547
}
15481548
#endif
15491549

@@ -1617,7 +1617,7 @@ vec_store_len(__vector double __vec, double *__ptr,
16171617
static inline __ATTRS_ai void
16181618
vec_store_len_r(__vector unsigned char __vec, unsigned char *__ptr,
16191619
unsigned int __len) {
1620-
__builtin_s390_vstrl((__vector signed char)__vec, __len, __ptr);
1620+
__builtin_s390_vstrlr((__vector signed char)__vec, __len, __ptr);
16211621
}
16221622
#endif
16231623

clang/test/CodeGen/SystemZ/builtins-systemz-vector2.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ void test_core(void) {
3333
vul = __builtin_s390_vbperm(vuc, vuc);
3434
// CHECK: call <2 x i64> @llvm.s390.vbperm(<16 x i8> %{{.*}}, <16 x i8> %{{.*}})
3535

36-
vsc = __builtin_s390_vlrl(len, cptr);
36+
vsc = __builtin_s390_vlrlr(len, cptr);
3737
// CHECK: call <16 x i8> @llvm.s390.vlrl(i32 %{{.*}}, ptr %{{.*}})
3838

39-
__builtin_s390_vstrl(vsc, len, ptr);
39+
__builtin_s390_vstrlr(vsc, len, ptr);
4040
// CHECK: call void @llvm.s390.vstrl(<16 x i8> %{{.*}}, i32 %{{.*}}, ptr %{{.*}})
4141
}
4242

llvm/include/llvm/IR/IntrinsicsSystemZ.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,11 +398,11 @@ let TargetPrefix = "s390" in {
398398
[IntrNoMem, ImmArg<ArgIndex<1>>, ImmArg<ArgIndex<2>>]>;
399399

400400
// Instructions from the Vector Packed Decimal Facility
401-
def int_s390_vlrl : ClangBuiltin<"__builtin_s390_vlrl">,
401+
def int_s390_vlrl : ClangBuiltin<"__builtin_s390_vlrlr">,
402402
Intrinsic<[llvm_v16i8_ty], [llvm_i32_ty, llvm_ptr_ty],
403403
[IntrReadMem, IntrArgMemOnly]>;
404404

405-
def int_s390_vstrl : ClangBuiltin<"__builtin_s390_vstrl">,
405+
def int_s390_vstrl : ClangBuiltin<"__builtin_s390_vstrlr">,
406406
Intrinsic<[], [llvm_v16i8_ty, llvm_i32_ty, llvm_ptr_ty],
407407
[IntrArgMemOnly, IntrWriteMem]>;
408408

0 commit comments

Comments
 (0)