[compiler-rt] Exclude unsupported compiler-rt tests on z/OS. (PR #194437)

via llvm-commits llvm-commits at lists.llvm.org
Thu May 7 10:03:47 PDT 2026


https://github.com/sujianIBM updated https://github.com/llvm/llvm-project/pull/194437

>From 16cec82aca13464f134bc778d110f36ac71f58d3 Mon Sep 17 00:00:00 2001
From: Jian Su <jian.su at ibm.com>
Date: Mon, 27 Apr 2026 19:07:10 +0000
Subject: [PATCH 1/4] Exclude unsupported compiler-rt tests on z/OS.

---
 compiler-rt/test/builtins/Unit/compiler_rt_logbl_test.c   | 7 +++++--
 compiler-rt/test/builtins/Unit/compiler_rt_scalbnl_test.c | 2 ++
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/compiler-rt/test/builtins/Unit/compiler_rt_logbl_test.c b/compiler-rt/test/builtins/Unit/compiler_rt_logbl_test.c
index f49ce710b0443..111286b53b0bc 100644
--- a/compiler-rt/test/builtins/Unit/compiler_rt_logbl_test.c
+++ b/compiler-rt/test/builtins/Unit/compiler_rt_logbl_test.c
@@ -34,8 +34,11 @@ int test__compiler_rt_logbl(fp_t x) {
 }
 
 fp_t cases[] = {
-    1.e-6, -1.e-6, NAN, -NAN, INFINITY, -INFINITY, -1,
-    -0.0,  0.0,    1,   -2,   2,        -0.5,      0.5,
+    1.e-6, -1.e-6,
+#ifndef __MVS__
+    NAN, -NAN, INFINITY, -INFINITY,
+#endif
+    -1,  -0.0,  0.0,    1,   -2,   2,        -0.5,      0.5,
 };
 
 int main() {
diff --git a/compiler-rt/test/builtins/Unit/compiler_rt_scalbnl_test.c b/compiler-rt/test/builtins/Unit/compiler_rt_scalbnl_test.c
index 0d9bbdfd68e4a..1cf7e6879b079 100644
--- a/compiler-rt/test/builtins/Unit/compiler_rt_scalbnl_test.c
+++ b/compiler-rt/test/builtins/Unit/compiler_rt_scalbnl_test.c
@@ -39,10 +39,12 @@ int test__compiler_rt_scalbnl(const char *mode, fp_t x, int y) {
 }
 
 fp_t cases[] = {
+#ifndef __MVS__
     -NAN,
     NAN,
     -INFINITY,
     INFINITY,
+#endif
     -0.0,
     0.0,
     -1,

>From 7a12dba445540bef1defb4de9307ae97347483ab Mon Sep 17 00:00:00 2001
From: Jian Su <jian.su at ibm.com>
Date: Mon, 27 Apr 2026 19:19:34 +0000
Subject: [PATCH 2/4] Fix format.

---
 compiler-rt/test/builtins/Unit/compiler_rt_logbl_test.c   | 8 ++++----
 compiler-rt/test/builtins/Unit/compiler_rt_scalbnl_test.c | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/compiler-rt/test/builtins/Unit/compiler_rt_logbl_test.c b/compiler-rt/test/builtins/Unit/compiler_rt_logbl_test.c
index 111286b53b0bc..a8edbb4bf2218 100644
--- a/compiler-rt/test/builtins/Unit/compiler_rt_logbl_test.c
+++ b/compiler-rt/test/builtins/Unit/compiler_rt_logbl_test.c
@@ -35,10 +35,10 @@ int test__compiler_rt_logbl(fp_t x) {
 
 fp_t cases[] = {
     1.e-6, -1.e-6,
-#ifndef __MVS__
-    NAN, -NAN, INFINITY, -INFINITY,
-#endif
-    -1,  -0.0,  0.0,    1,   -2,   2,        -0.5,      0.5,
+#  ifndef __MVS__
+    NAN,   -NAN,   INFINITY, -INFINITY,
+#  endif
+    -1,    -0.0,   0.0,      1,         -2, 2, -0.5, 0.5,
 };
 
 int main() {
diff --git a/compiler-rt/test/builtins/Unit/compiler_rt_scalbnl_test.c b/compiler-rt/test/builtins/Unit/compiler_rt_scalbnl_test.c
index 1cf7e6879b079..87b0dff30646c 100644
--- a/compiler-rt/test/builtins/Unit/compiler_rt_scalbnl_test.c
+++ b/compiler-rt/test/builtins/Unit/compiler_rt_scalbnl_test.c
@@ -39,12 +39,12 @@ int test__compiler_rt_scalbnl(const char *mode, fp_t x, int y) {
 }
 
 fp_t cases[] = {
-#ifndef __MVS__
+#  ifndef __MVS__
     -NAN,
     NAN,
     -INFINITY,
     INFINITY,
-#endif
+#  endif
     -0.0,
     0.0,
     -1,

>From 0adef2a696c6e735bb676f42e1a408253a354d11 Mon Sep 17 00:00:00 2001
From: Jian Su <jian.su at ibm.com>
Date: Thu, 7 May 2026 17:11:21 +0000
Subject: [PATCH 3/4] Add a comment for the reason of test failure.

---
 compiler-rt/test/builtins/Unit/compiler_rt_logbl_test.c   | 2 ++
 compiler-rt/test/builtins/Unit/compiler_rt_scalbnl_test.c | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/compiler-rt/test/builtins/Unit/compiler_rt_logbl_test.c b/compiler-rt/test/builtins/Unit/compiler_rt_logbl_test.c
index a8edbb4bf2218..5333a22e5d7cd 100644
--- a/compiler-rt/test/builtins/Unit/compiler_rt_logbl_test.c
+++ b/compiler-rt/test/builtins/Unit/compiler_rt_logbl_test.c
@@ -35,6 +35,8 @@ int test__compiler_rt_logbl(fp_t x) {
 
 fp_t cases[] = {
     1.e-6, -1.e-6,
+    // The logbl() function's behavior on the following values on z/OS
+    // differs from the C++ standard specification.
 #  ifndef __MVS__
     NAN,   -NAN,   INFINITY, -INFINITY,
 #  endif
diff --git a/compiler-rt/test/builtins/Unit/compiler_rt_scalbnl_test.c b/compiler-rt/test/builtins/Unit/compiler_rt_scalbnl_test.c
index 87b0dff30646c..62634be1cb3ff 100644
--- a/compiler-rt/test/builtins/Unit/compiler_rt_scalbnl_test.c
+++ b/compiler-rt/test/builtins/Unit/compiler_rt_scalbnl_test.c
@@ -39,6 +39,8 @@ int test__compiler_rt_scalbnl(const char *mode, fp_t x, int y) {
 }
 
 fp_t cases[] = {
+    // The scalbnl() function's behavior on the following values on z/OS
+    // differs from the C++ standard specification.
 #  ifndef __MVS__
     -NAN,
     NAN,

>From a171eebb29129bbe3a9fbf4e0d6cfb00f9fbc4d6 Mon Sep 17 00:00:00 2001
From: Jian Su <jian.su at ibm.com>
Date: Thu, 7 May 2026 17:17:35 +0000
Subject: [PATCH 4/4] Fix format.

---
 compiler-rt/test/builtins/Unit/compiler_rt_logbl_test.c   | 4 ++--
 compiler-rt/test/builtins/Unit/compiler_rt_scalbnl_test.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/compiler-rt/test/builtins/Unit/compiler_rt_logbl_test.c b/compiler-rt/test/builtins/Unit/compiler_rt_logbl_test.c
index 5333a22e5d7cd..437600a14c3b6 100644
--- a/compiler-rt/test/builtins/Unit/compiler_rt_logbl_test.c
+++ b/compiler-rt/test/builtins/Unit/compiler_rt_logbl_test.c
@@ -35,8 +35,8 @@ int test__compiler_rt_logbl(fp_t x) {
 
 fp_t cases[] = {
     1.e-6, -1.e-6,
-    // The logbl() function's behavior on the following values on z/OS
-    // differs from the C++ standard specification.
+// The logbl() function's behavior on the following values on z/OS
+// differs from the C++ standard specification.
 #  ifndef __MVS__
     NAN,   -NAN,   INFINITY, -INFINITY,
 #  endif
diff --git a/compiler-rt/test/builtins/Unit/compiler_rt_scalbnl_test.c b/compiler-rt/test/builtins/Unit/compiler_rt_scalbnl_test.c
index 62634be1cb3ff..fd14e1ae7009d 100644
--- a/compiler-rt/test/builtins/Unit/compiler_rt_scalbnl_test.c
+++ b/compiler-rt/test/builtins/Unit/compiler_rt_scalbnl_test.c
@@ -39,8 +39,8 @@ int test__compiler_rt_scalbnl(const char *mode, fp_t x, int y) {
 }
 
 fp_t cases[] = {
-    // The scalbnl() function's behavior on the following values on z/OS
-    // differs from the C++ standard specification.
+// The scalbnl() function's behavior on the following values on z/OS
+// differs from the C++ standard specification.
 #  ifndef __MVS__
     -NAN,
     NAN,



More information about the llvm-commits mailing list