Skip to content

Commit

Permalink
[builtins][NFC] Avoid using CRT_LDBL_128BIT in tests (#66832)
Browse files Browse the repository at this point in the history
https://reviews.llvm.org/D153812 removed this macro from
implementations. Clean this up from tests as well.
  • Loading branch information
pranavk authored Sep 20, 2023
1 parent b927490 commit 613a09d
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions compiler-rt/test/builtins/Unit/compiler_rt_fmaxl_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <stdio.h>
#include "fp_lib.h"

#if defined(CRT_HAS_128BIT) && defined(CRT_LDBL_128BIT)
#if defined(CRT_HAS_TF_MODE)

int test__compiler_rt_fmaxl(fp_t x, fp_t y) {
fp_t crt_value = __compiler_rt_fmaxl(x, y);
Expand Down Expand Up @@ -43,7 +43,7 @@ fp_t cases[] = {
#endif

int main() {
#if defined(CRT_HAS_128BIT) && defined(CRT_LDBL_128BIT)
#if defined(CRT_HAS_TF_MODE)
const unsigned N = sizeof(cases) / sizeof(cases[0]);
unsigned i, j;
for (i = 0; i < N; ++i) {
Expand Down
4 changes: 2 additions & 2 deletions compiler-rt/test/builtins/Unit/compiler_rt_logbl_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "fp_lib.h"
#include "int_lib.h"

#if defined(CRT_HAS_128BIT) && defined(CRT_LDBL_128BIT)
#if defined(CRT_HAS_TF_MODE)

int test__compiler_rt_logbl(fp_t x) {
#if defined(__ve__)
Expand Down Expand Up @@ -42,7 +42,7 @@ double cases[] = {
#endif

int main() {
#if defined(CRT_HAS_128BIT) && defined(CRT_LDBL_128BIT)
#if defined(CRT_HAS_TF_MODE)
const unsigned N = sizeof(cases) / sizeof(cases[0]);
unsigned i;
for (i = 0; i < N; ++i) {
Expand Down
4 changes: 2 additions & 2 deletions compiler-rt/test/builtins/Unit/compiler_rt_scalbnl_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <stdio.h>
#include "fp_lib.h"

#if defined(CRT_HAS_128BIT) && defined(CRT_LDBL_128BIT)
#if defined(CRT_HAS_TF_MODE)

int test__compiler_rt_scalbnl(const char *mode, fp_t x, int y) {
#if defined(__ve__)
Expand Down Expand Up @@ -67,7 +67,7 @@ int iterate_cases(const char *mode) {
#endif

int main() {
#if defined(CRT_HAS_128BIT) && defined(CRT_LDBL_128BIT)
#if defined(CRT_HAS_TF_MODE)
if (iterate_cases("default")) return 1;

// Skip rounding mode tests (fesetround) because compiler-rt's quad-precision
Expand Down
4 changes: 2 additions & 2 deletions compiler-rt/test/builtins/Unit/floattitf_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <float.h>
#include <stdio.h>

#if defined(CRT_HAS_128BIT) && defined(CRT_LDBL_128BIT)
#if defined(CRT_HAS_TF_MODE)

/* Returns: convert a ti_int to a fp_t, rounding toward even. */

Expand Down Expand Up @@ -39,7 +39,7 @@ char assumption_3[sizeof(fp_t) * CHAR_BIT == 128] = {0};
#endif

int main() {
#if defined(CRT_HAS_128BIT) && defined(CRT_LDBL_128BIT)
#if defined(CRT_HAS_TF_MODE)
if (test__floattitf(0, 0.0))
return 1;

Expand Down
4 changes: 2 additions & 2 deletions compiler-rt/test/builtins/Unit/floatuntitf_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <float.h>
#include <stdio.h>

#if defined(CRT_HAS_128BIT) && defined(CRT_LDBL_128BIT)
#if defined(CRT_HAS_TF_MODE)

/* Returns: convert a tu_int to a fp_t, rounding toward even. */

Expand Down Expand Up @@ -39,7 +39,7 @@ char assumption_3[sizeof(fp_t) * CHAR_BIT == 128] = {0};
#endif

int main() {
#if defined(CRT_HAS_128BIT) && defined(CRT_LDBL_128BIT)
#if defined(CRT_HAS_TF_MODE)
if (test__floatuntitf(0, 0.0))
return 1;

Expand Down

0 comments on commit 613a09d

Please sign in to comment.