[PATCH] D159453: [Matrix] Fix test on SystemZ

Jakub Kuderski via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 5 11:33:42 PDT 2023


kuhar created this revision.
Herald added subscribers: hanchung, tschuett.
Herald added a project: All.
kuhar requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D159453

Files:
  clang/test/CodeGen/ffp-model.c


Index: clang/test/CodeGen/ffp-model.c
===================================================================
--- clang/test/CodeGen/ffp-model.c
+++ clang/test/CodeGen/ffp-model.c
@@ -49,9 +49,9 @@
 
 typedef float __attribute__((ext_vector_type(2))) v2f;
 
-v2f my_vec_muladd(v2f x, float y, v2f z) {
-  // CHECK: define{{.*}} @my_vec_muladd
-  return x * y + z;
+void my_vec_muladd(v2f x, float y, v2f z, v2f *res) {
+  // CHECK: define{{.*}}@my_vec_muladd
+  *res = x * y + z;
 
   // CHECK-FAST: fmul fast <2 x float>
   // CHECK-FAST: load <2 x float>, ptr
@@ -83,9 +83,9 @@
 
 typedef float __attribute__((matrix_type(2, 1))) m21f;
 
-m21f my_m21_muladd(m21f x, float y, m21f z) {
-  // CHECK: define{{.*}} <2 x float> @my_m21_muladd
-  return x * y + z;
+void my_m21_muladd(m21f x, float y, m21f z, m21f *res) {
+  // CHECK: define{{.*}}@my_m21_muladd
+  *res = x * y + z;
 
   // CHECK-FAST: fmul fast <2 x float>
   // CHECK-FAST: load <2 x float>, ptr
@@ -117,9 +117,9 @@
 
 typedef float __attribute__((matrix_type(2, 2))) m22f;
 
-m22f my_m22_muladd(m22f x, float y, m22f z) {
-  // CHECK: define{{.*}} <4 x float> @my_m22_muladd
-  return x * y + z;
+void my_m22_muladd(m22f x, float y, m22f z, m22f *res) {
+  // CHECK: define{{.*}}@my_m22_muladd
+  *res = x * y + z;
 
   // CHECK-FAST: fmul fast <4 x float>
   // CHECK-FAST: load <4 x float>, ptr


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D159453.555908.patch
Type: text/x-patch
Size: 1360 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230905/ec6413e3/attachment-0001.bin>


More information about the cfe-commits mailing list