[compiler-rt] cdc6f4c - [builtins] Fix building trunc*fhf2_test with GCC
Alex Richardson via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 24 17:20:18 PDT 2023
Author: Alex Richardson
Date: 2023-07-24T17:19:11-07:00
New Revision: cdc6f4cdcdb5a30840dfbc34a981c9e19adc7996
URL: https://github.com/llvm/llvm-project/commit/cdc6f4cdcdb5a30840dfbc34a981c9e19adc7996
DIFF: https://github.com/llvm/llvm-project/commit/cdc6f4cdcdb5a30840dfbc34a981c9e19adc7996.diff
LOG: [builtins] Fix building trunc*fhf2_test with GCC
GCC does not support __fp16, use the TYPE_FP16 macro instead.
Differential Revision: https://reviews.llvm.org/D153813
Added:
Modified:
compiler-rt/test/builtins/Unit/truncdfhf2_test.c
compiler-rt/test/builtins/Unit/truncsfhf2_test.c
Removed:
################################################################################
diff --git a/compiler-rt/test/builtins/Unit/truncdfhf2_test.c b/compiler-rt/test/builtins/Unit/truncdfhf2_test.c
index 1990ec9503a7a6..8d854fffc466a7 100644
--- a/compiler-rt/test/builtins/Unit/truncdfhf2_test.c
+++ b/compiler-rt/test/builtins/Unit/truncdfhf2_test.c
@@ -19,7 +19,7 @@ int test__truncdfhf2(double a, uint16_t expected)
return ret;
}
-char assumption_1[sizeof(__fp16) * CHAR_BIT == 16] = {0};
+char assumption_1[sizeof(TYPE_FP16) * CHAR_BIT == 16] = {0};
int main()
{
diff --git a/compiler-rt/test/builtins/Unit/truncsfhf2_test.c b/compiler-rt/test/builtins/Unit/truncsfhf2_test.c
index c7c8063d52187f..218f407eea7d0d 100644
--- a/compiler-rt/test/builtins/Unit/truncsfhf2_test.c
+++ b/compiler-rt/test/builtins/Unit/truncsfhf2_test.c
@@ -19,7 +19,7 @@ int test__truncsfhf2(float a, uint16_t expected)
return ret;
}
-char assumption_1[sizeof(__fp16) * CHAR_BIT == 16] = {0};
+char assumption_1[sizeof(TYPE_FP16) * CHAR_BIT == 16] = {0};
int main()
{
More information about the llvm-commits
mailing list