[PATCH v2 0/1] libgccjit: Make is_same_type_as() supporting floating point types
Antoni Boucher via Sourceware Forge
forge-bot+antoyo@forge-stage.sourceware.org
Fri May 22 14:54:36 GMT 2026
Hi gcc-patches mailing list,
Antoni Boucher via Sourceware Forge <forge-bot+antoyo@forge-stage.sourceware.org> has requested that the following forgejo pull request
be published on the mailing list.
Created on: 2025-10-13 15:41:02+00:00
Latest update: 2026-05-22 14:54:05+00:00
Changes: 4 changed files, 88 additions, 3 deletions
Head revision: antoyo/gcc ref fix/float-comparison commit 23bd79ba49ec26b7acdcc2c6f51e088a0f4275de
Base revision: gcc/gcc-TEST ref trunk commit 6c01778628d93c5135536e051dc39f8d85198d06 r16-4563-g6c01778628d93c
Merge base: 6c01778628d93c5135536e051dc39f8d85198d06
Full diff url: https://forge.sourceware.org/gcc/gcc-TEST/pulls/97.diff
Discussion: https://forge.sourceware.org/gcc/gcc-TEST/pulls/97
Requested Reviewers: dmalcolm
```
gcc/jit/ChangeLog:
* jit-recording.h: Fix float comparison.
* libgccjit.cc: Fix type check in gcc_jit_context_new_comparison.
gcc/testsuite/ChangeLog:
* jit.dg/all-non-failing-tests.h: Mention new test.
* jit.dg/test-comparison.c: New test.
Co-authored-by: Antoni Boucher <bouanto@zoho.com>
```
Changed files:
- A: gcc/testsuite/jit.dg/test-comparison.c
- M: gcc/jit/jit-recording.h
- M: gcc/jit/libgccjit.cc
- M: gcc/testsuite/jit.dg/all-non-failing-tests.h
Robert Zakrzewski (1):
libgccjit: Make is_same_type_as() supporting floating point types
gcc/jit/jit-recording.h | 3 +-
gcc/jit/libgccjit.cc | 3 +-
gcc/testsuite/jit.dg/all-non-failing-tests.h | 7 ++
gcc/testsuite/jit.dg/test-comparison.c | 78 ++++++++++++++++++++
4 files changed, 88 insertions(+), 3 deletions(-)
create mode 100644 gcc/testsuite/jit.dg/test-comparison.c
Range-diff against v1:
1: 7de81690d864 ! 1: 23bd79ba49ec libgccjit: Make is_same_type_as() supporting floating point types
@@ gcc/testsuite/jit.dg/test-comparison.c (new)
+ gcc_jit_target_info* target_info = gcc_jit_context_get_target_info (ctxt);
+ if (gcc_jit_target_info_supports_target_dependent_type (target_info,
+ GCC_JIT_TYPE_FLOAT32))
-+ float32_type = gcc_jit_type_get_aligned (float_type, 4);
++ {
++ gcc_jit_type *sized_float_type =
++ gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_FLOAT32);
++ float32_type = gcc_jit_type_get_aligned (sized_float_type, 4);
++ }
+ else
+ float32_type = gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_FLOAT);
+
--
2.54.0
More information about the Jit
mailing list