Skip to content

Commit c9492a0

Browse files
committed
[compiler-rt] Disable tests for unavailable builtins (llvm#158664)
The builtins `__fixunstfdi` and `__multc3` may be removed by the preprocessor depending on configuration flags. When this happens, the corresponding tests fail at link time due to missing definitions. Disable these tests when the builtins are not available. rdar://159705803 rdar://159705705
1 parent 9df1099 commit c9492a0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

compiler-rt/test/builtins/Unit/fixunstfdi_test.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#include <stdio.h>
66

7-
#if _ARCH_PPC || __aarch64__ || __arm64ec__
7+
#if defined(CRT_HAS_TF_MODE)
88

99
#define QUAD_PRECISION
1010
#include "fp_lib.h"
@@ -38,7 +38,7 @@ char assumption_3[sizeof(fp_t)*CHAR_BIT == 128] = {0};
3838

3939
int main()
4040
{
41-
#if _ARCH_PPC || __aarch64__ || __arm64ec__
41+
#if defined(CRT_HAS_TF_MODE)
4242
if (test__fixunstfdi(0.0, 0))
4343
return 1;
4444

compiler-rt/test/builtins/Unit/multc3_test.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#include <stdio.h>
66

7-
#if _ARCH_PPC || __aarch64__ || __arm64ec__
7+
#if defined(CRT_HAS_128BIT) && defined(CRT_HAS_F128)
88

99
#define QUAD_PRECISION
1010
#include "fp_lib.h"
@@ -351,7 +351,7 @@ fp_t x[][2] =
351351

352352
int main()
353353
{
354-
#if _ARCH_PPC || __aarch64__ || __arm64ec__
354+
#if defined(CRT_HAS_128BIT) && defined(CRT_HAS_F128)
355355
const unsigned N = sizeof(x) / sizeof(x[0]);
356356
unsigned i, j;
357357
for (i = 0; i < N; ++i)

0 commit comments

Comments
 (0)