Skip to content

Commit c1eacc3

Browse files
author
Francis Visoiu Mistrih
committed
[Matrix] Fix test on SystemZ
As reported by @uweigand in https://reviews.llvm.org/D158883: ``` The newly added test cases in ffp-model.c fail on SystemZ, making CI red: https://lab.llvm.org/buildbot/#/builders/94/builds/16280 The root cause seems to be that by default, the SystemZ back-end targets a machine without SIMD support, and therefore vector return types are passed via implicit reference according to the ABI ``` this uses manual stores instead of vector returns.
1 parent f465a48 commit c1eacc3

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

clang/test/CodeGen/ffp-model.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ float mymuladd(float x, float y, float z) {
4949

5050
typedef float __attribute__((ext_vector_type(2))) v2f;
5151

52-
v2f my_vec_muladd(v2f x, float y, v2f z) {
53-
// CHECK: define{{.*}} @my_vec_muladd
54-
return x * y + z;
52+
void my_vec_muladd(v2f x, float y, v2f z, v2f *res) {
53+
// CHECK: define{{.*}}@my_vec_muladd
54+
*res = x * y + z;
5555

5656
// CHECK-FAST: fmul fast <2 x float>
5757
// CHECK-FAST: load <2 x float>, ptr
@@ -83,9 +83,9 @@ v2f my_vec_muladd(v2f x, float y, v2f z) {
8383

8484
typedef float __attribute__((matrix_type(2, 1))) m21f;
8585

86-
m21f my_m21_muladd(m21f x, float y, m21f z) {
87-
// CHECK: define{{.*}} <2 x float> @my_m21_muladd
88-
return x * y + z;
86+
void my_m21_muladd(m21f x, float y, m21f z, m21f *res) {
87+
// CHECK: define{{.*}}@my_m21_muladd
88+
*res = x * y + z;
8989

9090
// CHECK-FAST: fmul fast <2 x float>
9191
// CHECK-FAST: load <2 x float>, ptr
@@ -117,9 +117,9 @@ m21f my_m21_muladd(m21f x, float y, m21f z) {
117117

118118
typedef float __attribute__((matrix_type(2, 2))) m22f;
119119

120-
m22f my_m22_muladd(m22f x, float y, m22f z) {
121-
// CHECK: define{{.*}} <4 x float> @my_m22_muladd
122-
return x * y + z;
120+
void my_m22_muladd(m22f x, float y, m22f z, m22f *res) {
121+
// CHECK: define{{.*}}@my_m22_muladd
122+
*res = x * y + z;
123123

124124
// CHECK-FAST: fmul fast <4 x float>
125125
// CHECK-FAST: load <4 x float>, ptr

0 commit comments

Comments
 (0)