[PATCH v2 0/1] libgccjit: Add gcc_jit_type_is_floating_point

David Malcolm via Sourceware Forge forge-bot+dmalcolm@forge-stage.sourceware.org
Fri May 22 14:27:10 GMT 2026


David Malcolm (dmalcolm) <dmalcolm@gcc.gnu.org>) commented on the code:


> +++ gcc/testsuite/jit.dg/test-reflection.c
> @@ -27,0 +34,4 @@
> +
> +  gcc_jit_target_info *target_info = gcc_jit_context_get_target_info(ctxt);
> +  if (target_info != NULL && gcc_jit_target_info_supports_target_dependent_type(target_info, GCC_JIT_TYPE_FLOAT16))
> +  {
I see uses of gcc_jit_context_get_target_info and gcc_jit_target_info_supports_target_dependent_type; is this dependent on another patch? (and is that one stuck on review?)

Alternatively, this could lose the parts of the test coverage that use gcc_jit_target_info and go ahead into trunk.

> +++ gcc/testsuite/jit.dg/test-reflection.c
> @@ -27,0 +34,4 @@
> +
> +  gcc_jit_target_info *target_info = gcc_jit_context_get_target_info(ctxt);
> +  if (target_info != NULL && gcc_jit_target_info_supports_target_dependent_type(target_info, GCC_JIT_TYPE_FLOAT16))
> +  {
Oh yeah, this test depends on [this patch](https://github.com/antoyo/libgccjit/pull/6#pullrequestreview-3029588718).
I'm blocked because I'm not sure what to do with the fact that `host_detect_local_cpu` is not available for cross-compilers. Do you have an idea of how to fix that?
Thanks.

> +++ gcc/testsuite/jit.dg/test-reflection.c
> @@ -27,0 +34,4 @@
> +
> +  gcc_jit_target_info *target_info = gcc_jit_context_get_target_info(ctxt);
> +  if (target_info != NULL && gcc_jit_target_info_supports_target_dependent_type(target_info, GCC_JIT_TYPE_FLOAT16))
> +  {
Oh, it also uses the sized types (like `GCC_JIT_TYPE_FLOAT16`) which are not upstream either.
I'll send the patch for this.
Sorry about that.

> +++ gcc/testsuite/jit.dg/test-reflection.c
> @@ -27,0 +34,4 @@
> +
> +  gcc_jit_target_info *target_info = gcc_jit_context_get_target_info(ctxt);
> +  if (target_info != NULL && gcc_jit_target_info_supports_target_dependent_type(target_info, GCC_JIT_TYPE_FLOAT16))
> +  {
I got unblocked and I updated [the patch](https://github.com/antoyo/libgccjit/pull/6) for cpu features detection that is blocking this PR.
@dmalcolm: Could you please review that patch?

I also updated this PR to fix the `ifdef`

Thanks.

> +++ gcc/testsuite/jit.dg/test-reflection.c
> @@ -27,0 +34,4 @@
> +
> +  gcc_jit_target_info *target_info = gcc_jit_context_get_target_info(ctxt);
> +  if (target_info != NULL && gcc_jit_target_info_supports_target_dependent_type(target_info, GCC_JIT_TYPE_FLOAT16))
> +  {
@antoyo wrote in https://forge.sourceware.org/gcc/gcc-TEST/pulls/74#issuecomment-2293:

> Oh, it also uses the sized types (like `GCC_JIT_TYPE_FLOAT16`) which are not upstream either.

Those were added in [#82.](https://forge.sourceware.org/gcc/gcc-TEST/pulls/82).

> +++ gcc/testsuite/jit.dg/test-reflection.c
> @@ -27,0 +34,4 @@
> +
> +  gcc_jit_target_info *target_info = gcc_jit_context_get_target_info(ctxt);
> +  if (target_info != NULL && gcc_jit_target_info_supports_target_dependent_type(target_info, GCC_JIT_TYPE_FLOAT16))
> +  {
[The required patch](https://github.com/antoyo/libgccjit/pull/6) was merged.

Now, the only thing missing is merging the [dependent pull request](https://forge.sourceware.org/gcc/gcc-TEST/pulls/82) (**edit:** Done).


--
https://forge.sourceware.org/gcc/gcc-TEST/pulls/74#issuecomment-2232


More information about the Jit mailing list