libgccjit: Make is_same_type_as() supporting floating point types #97

Open
antoyo wants to merge 1 commit from antoyo/gcc:fix/float-comparison into trunk
Member
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>

CC: David Malcolm dmalcolm@redhat.com, jit@gcc.gnu.org

``` 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> ``` CC: David Malcolm <dmalcolm@redhat.com>, <jit@gcc.gnu.org>
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>
Member

Welcome to Sourceware Forge

Hi @antoyo, and thanks for your PR. This bot helps you send your patch series to the mailing list.

Please follow these guidelines to ensure a smooth submission.

Writing a Good PR Description

  • If your PR has multiple commits, write a meaningful description. It becomes the cover letter.
  • For a single commit, you can leave the description empty if the commit message is clear.

To CC reviewers, add at the end of your PR description one or more lines like this:

CC: Revi Ewer <revi.ewer@example.com>, Ill Takalook <ill.takalook@example.net>

Avoid copy-pasting a CC list from a previous PR. Doing so may cause failure to send the emails properly.

We recommend reviewing your commit messages carefully before submitting.

This project expects a specific format.
See Submitting Patches for details

Submitting Your Patch

To submit, you must be authorized. Ask any permitted contributor to authorize you by commenting: /allow. This is anyone who has been /allowed before.

Once allowed, comment: /submit

Use /preview to see the emails before sending. (Requires a public forge email.)

Responding to Reviews

Watch for replies on the mailing list. If not subscribed, you can reply by:

  1. Visiting inbox.sourceware.org
  2. Clicking (raw) on the email
  3. Importing it into your mail client

For Gmail:

curl -g --user "<Email>:<Password>" \
  --url "imaps://imap.gmail.com/INBOX" -T /path/to/raw.txt

Updating Your PR

  1. Push new commits, rebase and force push changes to the same branch as needed
  2. Update the PR description with a “Changes since vX” section
  3. Comment again with: /submit

Need help?

Consider joining the gcc and gcc-patches mailing lists..
For real time communication, check the gcc irc channels.

Or join #overseers on Libera Chat, particularly if this automation is not working (stay online to get replies, IRC does not save messages if people are not online).

<!-- pr-welcome --> # Welcome to Sourceware Forge Hi @antoyo, and thanks for your PR. This bot helps you send your patch series to the mailing list. Please follow these guidelines to ensure a smooth submission. ## Writing a Good PR Description - If your PR has **multiple commits**, write a meaningful description. It becomes the cover letter. - For **a single commit**, you can leave the description empty if the commit message is clear. To CC reviewers, add at the end of your PR description one or more lines like this: ```text CC: Revi Ewer <revi.ewer@example.com>, Ill Takalook <ill.takalook@example.net> ``` Avoid copy-pasting a CC list from a previous PR. Doing so may cause failure to send the emails properly. We recommend reviewing your commit messages carefully before submitting. This project expects a specific format. See [Submitting Patches](https://gcc.gnu.org/contribute.html#patches) for details ## Submitting Your Patch To submit, you must be authorized. Ask any permitted contributor to authorize you by commenting: `/allow`. This is anyone who has been `/allow`ed before. Once allowed, comment: `/submit` Use `/preview` to see the emails before sending. (Requires a public forge email.) ## Responding to Reviews Watch for replies on the mailing list. If not subscribed, you can reply by: 1. Visiting [inbox.sourceware.org](https://inbox.sourceware.org) 2. Clicking `(raw)` on the email 3. Importing it into your mail client For Gmail: ```sh curl -g --user "<Email>:<Password>" \ --url "imaps://imap.gmail.com/INBOX" -T /path/to/raw.txt ``` ## Updating Your PR 1. Push new commits, rebase and force push changes to the same branch as needed 2. Update the PR description with a “Changes since vX” section 3. Comment again with: `/submit` ## Need help? Consider joining the [gcc and gcc-patches mailing lists.](https://gcc.gnu.org/lists.html). For real time communication, check the [gcc irc channels](https://gcc.gnu.org/wiki/GCConIRC). Or join [`#overseers`](https://web.libera.chat/#overseers) on Libera Chat, particularly if this automation is not working (stay online to get replies, IRC does not save messages if people are not online).
Author
Member

/submit

/submit
Member

Version 1 of this pull request has been stored. It includes the following commits:

  • libgccjit: Make is_same_type_as() supporting floating point types - 7de81690d8
<!-- pr-new-version --> Version 1 of this pull request has been stored. It includes the following commits: - libgccjit: Make is_same_type_as() supporting floating point types - 7de81690d864cbecac313df9d218b59407278ed1
Member

Pull Request versions:

# Base Head
1 51b76ec931 7de81690d8 (diff)

In order to compare , clone this repository and run

PR=97
git fetch origin "refs/versioned_pull/${PR}/*:refs/versioned_pull/${PR}/*"
PRV1=1
PRV2=2
git range-diff "refs/versioned_pull/${PR}/${PRV1}/base..refs/versioned_pull/${PR}/${PRV1}/head"  "refs/versioned_pull/${PR}/${PRV2}/base..refs/versioned_pull/${PR}/${PRV2}/head"
<!-- pr-versions --> Pull Request versions: | # | Base | Head | | | - | ---- | ---- | - | | 1 | 51b76ec931c8bbd388a7d7fa706df8d1d6ce0829 | 7de81690d864cbecac313df9d218b59407278ed1 | [(diff)](https://forge.sourceware.org/gcc/gcc-TEST.git/compare/51b76ec931c8bbd388a7d7fa706df8d1d6ce0829...7de81690d864cbecac313df9d218b59407278ed1) | In order to compare , clone this repository and run ``` PR=97 git fetch origin "refs/versioned_pull/${PR}/*:refs/versioned_pull/${PR}/*" PRV1=1 PRV2=2 git range-diff "refs/versioned_pull/${PR}/${PRV1}/base..refs/versioned_pull/${PR}/${PRV1}/head" "refs/versioned_pull/${PR}/${PRV2}/base..refs/versioned_pull/${PR}/${PRV2}/head" ```
Member

Sent patch series version 1 containing 1 patches to gcc-patches mailing list test-list@sourceware.org and cc'd David Malcolm dmalcolm@redhat.com, jit@gcc.gnu.org.
Cover letter

Sent patch series version 1 containing 1 patches to gcc-patches mailing list <test-list@sourceware.org> and cc'd David Malcolm <dmalcolm@redhat.com>, <jit@gcc.gnu.org>. [Cover letter](https://inbox.sourceware.org/test-list/176037034851.913.5674215728426267528.batrachomyomachia.gcc.gcc-TEST.97.1.0@forge-test.rdfm.org)
First-time contributor
<!-- linaro-ci-status CI bot https://ci.linaro.org/job/tcwg_gnu_cross_build--master-aarch64-precommit/75/ --> CI state: success :white_check_mark: CI bot https://ci.linaro.org/job/tcwg_gnu_cross_build--master-aarch64-precommit/75/ : CI bot tcwg_gnu_cross_build--master-aarch64: Build results See: https://ci.linaro.org/job/tcwg_gnu_cross_build--master-aarch64-precommit/75/artifact/artifacts/artifacts.precommit/notify/mail-body.txt
First-time contributor
<!-- linaro-ci-status CI bot https://ci.linaro.org/job/tcwg_gnu_cross_build--master-arm-precommit/108/ --> CI state: success :white_check_mark: CI bot https://ci.linaro.org/job/tcwg_gnu_cross_build--master-arm-precommit/108/ : CI bot tcwg_gnu_cross_build--master-arm: Build results See: https://ci.linaro.org/job/tcwg_gnu_cross_build--master-arm-precommit/108/artifact/artifacts/artifacts.precommit/notify/mail-body.txt
@ -0,0 +29,4 @@
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);
Author
Member

When the dependent PR is merged, use GCC_JIT_TYPE_FLOAT32 here.

When the dependent PR is merged, use `GCC_JIT_TYPE_FLOAT32` here.
antoyo marked this conversation as resolved
antoyo force-pushed fix/float-comparison from 7de81690d8 to 23bd79ba49
Some checks failed
/ testjob (pull_request) Has been cancelled
2025-10-22 13:23:58 +00:00
Compare
First-time contributor
<!-- linaro-ci-status CI bot https://ci.linaro.org/job/tcwg_gnu_cross_build--master-aarch64-precommit/95/ --> CI state: success :white_check_mark: CI bot https://ci.linaro.org/job/tcwg_gnu_cross_build--master-aarch64-precommit/95/ : CI bot tcwg_gnu_cross_build--master-aarch64: Build results See: https://ci.linaro.org/job/tcwg_gnu_cross_build--master-aarch64-precommit/95/artifact/artifacts/artifacts.precommit/notify/mail-body.txt
First-time contributor
<!-- linaro-ci-status CI bot https://ci.linaro.org/job/tcwg_gnu_cross_build--master-arm-precommit/123/ --> CI state: success :white_check_mark: CI bot https://ci.linaro.org/job/tcwg_gnu_cross_build--master-arm-precommit/123/ : CI bot tcwg_gnu_cross_build--master-arm: Build results See: https://ci.linaro.org/job/tcwg_gnu_cross_build--master-arm-precommit/123/artifact/artifacts/artifacts.precommit/notify/mail-body.txt
First-time contributor

CI state: success
CI bot https://ci.linaro.org/job/tcwg_gnu_cross_check_gcc--master-arm-precommit/122/ : CI bot tcwg_gnu_cross_check_gcc--master-arm: Test results
See: https://ci.linaro.org/job/tcwg_gnu_cross_check_gcc--master-arm-precommit/122/artifact/artifacts/artifacts.precommit/notify/mail-body.txt

Dear contributor,

Our automatic CI successfully passed with your patch(es). Please find some details below.

In  master-arm, after:
  | gcc patch https://forge.sourceware.org/gcc/gcc-TEST/pulls/97
  | Author: Robert Zakrzewski <robert.zakrzewski1@stellantis.com>
  | Date:   Mon Apr 29 12:19:28 2024 +0200
  | 
  |     [PATCH] libgccjit: Make is_same_type_as() supporting floating point types
  |     
  |     gcc/jit/ChangeLog:
  |     
  |             * jit-recording.h: Fix float comparison.
  | ... 8 lines of the commit log omitted.
  | ... applied on top of baseline commit:
  | a46dffee33a3 match.pd: Fold VEC_PERM_EXPR chains implementing concat-and-extract


Used configuration :
 *CI config* tcwg_gnu_cross_check_gcc master-arm
 *configure and test flags:* --target arm-linux-gnueabihf 

If you have any questions regarding this report, please ask on linaro-toolchain@lists.linaro.org mailing list.

-----------------8<--------------------------8<--------------------------8<--------------------------

The information below contains the details of the failures, and the ways to reproduce a debug environment:

You can find the failure logs in *.log.1.xz files in
 * https://ci.linaro.org/job/tcwg_gnu_cross_check_gcc--master-arm-precommit/122/artifact/artifacts/artifacts.precommit/00-sumfiles/
The full lists of regressions and improvements as well as configure and make commands are in
 * https://ci.linaro.org/job/tcwg_gnu_cross_check_gcc--master-arm-precommit/122/artifact/artifacts/artifacts.precommit/notify/
The list of [ignored] baseline and flaky failures are in
 * https://ci.linaro.org/job/tcwg_gnu_cross_check_gcc--master-arm-precommit/122/artifact/artifacts/artifacts.precommit/sumfiles/xfails.xfail

Current build   : https://ci.linaro.org/job/tcwg_gnu_cross_check_gcc--master-arm-precommit/122/artifact/artifacts
Reference build : https://ci.linaro.org/job/tcwg_gnu_cross_check_gcc--master-arm-build/2409/artifact/artifacts

Warning: we do not enable maintainer-mode nor automatically update
generated files, which may lead to failures if the patch modifies the
master files.

<!-- linaro-ci-status CI bot https://ci.linaro.org/job/tcwg_gnu_cross_check_gcc--master-arm-precommit/122/ --> CI state: success :white_check_mark: CI bot https://ci.linaro.org/job/tcwg_gnu_cross_check_gcc--master-arm-precommit/122/ : CI bot tcwg_gnu_cross_check_gcc--master-arm: Test results See: https://ci.linaro.org/job/tcwg_gnu_cross_check_gcc--master-arm-precommit/122/artifact/artifacts/artifacts.precommit/notify/mail-body.txt ``` Dear contributor, Our automatic CI successfully passed with your patch(es). Please find some details below. In master-arm, after: | gcc patch https://forge.sourceware.org/gcc/gcc-TEST/pulls/97 | Author: Robert Zakrzewski <robert.zakrzewski1@stellantis.com> | Date: Mon Apr 29 12:19:28 2024 +0200 | | [PATCH] libgccjit: Make is_same_type_as() supporting floating point types | | gcc/jit/ChangeLog: | | * jit-recording.h: Fix float comparison. | ... 8 lines of the commit log omitted. | ... applied on top of baseline commit: | a46dffee33a3 match.pd: Fold VEC_PERM_EXPR chains implementing concat-and-extract Used configuration : *CI config* tcwg_gnu_cross_check_gcc master-arm *configure and test flags:* --target arm-linux-gnueabihf If you have any questions regarding this report, please ask on linaro-toolchain@lists.linaro.org mailing list. -----------------8<--------------------------8<--------------------------8<-------------------------- The information below contains the details of the failures, and the ways to reproduce a debug environment: You can find the failure logs in *.log.1.xz files in * https://ci.linaro.org/job/tcwg_gnu_cross_check_gcc--master-arm-precommit/122/artifact/artifacts/artifacts.precommit/00-sumfiles/ The full lists of regressions and improvements as well as configure and make commands are in * https://ci.linaro.org/job/tcwg_gnu_cross_check_gcc--master-arm-precommit/122/artifact/artifacts/artifacts.precommit/notify/ The list of [ignored] baseline and flaky failures are in * https://ci.linaro.org/job/tcwg_gnu_cross_check_gcc--master-arm-precommit/122/artifact/artifacts/artifacts.precommit/sumfiles/xfails.xfail Current build : https://ci.linaro.org/job/tcwg_gnu_cross_check_gcc--master-arm-precommit/122/artifact/artifacts Reference build : https://ci.linaro.org/job/tcwg_gnu_cross_check_gcc--master-arm-build/2409/artifact/artifacts Warning: we do not enable maintainer-mode nor automatically update generated files, which may lead to failures if the patch modifies the master files. ```
First-time contributor

CI state: success
CI bot https://ci.linaro.org/job/tcwg_gnu_cross_check_gcc--master-aarch64-precommit/83/ : CI bot tcwg_gnu_cross_check_gcc--master-aarch64: Test results
See: https://ci.linaro.org/job/tcwg_gnu_cross_check_gcc--master-aarch64-precommit/83/artifact/artifacts/artifacts.precommit/notify/mail-body.txt

Dear contributor,

Our automatic CI successfully passed with your patch(es). Please find some details below.

In  master-aarch64, after:
  | gcc patch https://forge.sourceware.org/gcc/gcc-TEST/pulls/97
  | Author: Robert Zakrzewski <robert.zakrzewski1@stellantis.com>
  | Date:   Mon Apr 29 12:19:28 2024 +0200
  | 
  |     [PATCH] libgccjit: Make is_same_type_as() supporting floating point types
  |     
  |     gcc/jit/ChangeLog:
  |     
  |             * jit-recording.h: Fix float comparison.
  | ... 8 lines of the commit log omitted.
  | ... applied on top of baseline commit:
  | 2ea9d663650 [RISC-V][PR rtl-optimization/122627] Yet another fix in IRA equivalence array handling


Used configuration :
 *CI config* tcwg_gnu_cross_check_gcc master-aarch64
 *configure and test flags:* --target aarch64-linux-gnu 

If you have any questions regarding this report, please ask on linaro-toolchain@lists.linaro.org mailing list.

-----------------8<--------------------------8<--------------------------8<--------------------------

The information below contains the details of the failures, and the ways to reproduce a debug environment:

You can find the failure logs in *.log.1.xz files in
 * https://ci.linaro.org/job/tcwg_gnu_cross_check_gcc--master-aarch64-precommit/83/artifact/artifacts/artifacts.precommit/00-sumfiles/
The full lists of regressions and improvements as well as configure and make commands are in
 * https://ci.linaro.org/job/tcwg_gnu_cross_check_gcc--master-aarch64-precommit/83/artifact/artifacts/artifacts.precommit/notify/
The list of [ignored] baseline and flaky failures are in
 * https://ci.linaro.org/job/tcwg_gnu_cross_check_gcc--master-aarch64-precommit/83/artifact/artifacts/artifacts.precommit/sumfiles/xfails.xfail

Current build   : https://ci.linaro.org/job/tcwg_gnu_cross_check_gcc--master-aarch64-precommit/83/artifact/artifacts
Reference build : https://ci.linaro.org/job/tcwg_gnu_cross_check_gcc--master-aarch64-build/2420/artifact/artifacts

Warning: we do not enable maintainer-mode nor automatically update
generated files, which may lead to failures if the patch modifies the
master files.

<!-- linaro-ci-status CI bot https://ci.linaro.org/job/tcwg_gnu_cross_check_gcc--master-aarch64-precommit/83/ --> CI state: success :white_check_mark: CI bot https://ci.linaro.org/job/tcwg_gnu_cross_check_gcc--master-aarch64-precommit/83/ : CI bot tcwg_gnu_cross_check_gcc--master-aarch64: Test results See: https://ci.linaro.org/job/tcwg_gnu_cross_check_gcc--master-aarch64-precommit/83/artifact/artifacts/artifacts.precommit/notify/mail-body.txt ``` Dear contributor, Our automatic CI successfully passed with your patch(es). Please find some details below. In master-aarch64, after: | gcc patch https://forge.sourceware.org/gcc/gcc-TEST/pulls/97 | Author: Robert Zakrzewski <robert.zakrzewski1@stellantis.com> | Date: Mon Apr 29 12:19:28 2024 +0200 | | [PATCH] libgccjit: Make is_same_type_as() supporting floating point types | | gcc/jit/ChangeLog: | | * jit-recording.h: Fix float comparison. | ... 8 lines of the commit log omitted. | ... applied on top of baseline commit: | 2ea9d663650 [RISC-V][PR rtl-optimization/122627] Yet another fix in IRA equivalence array handling Used configuration : *CI config* tcwg_gnu_cross_check_gcc master-aarch64 *configure and test flags:* --target aarch64-linux-gnu If you have any questions regarding this report, please ask on linaro-toolchain@lists.linaro.org mailing list. -----------------8<--------------------------8<--------------------------8<-------------------------- The information below contains the details of the failures, and the ways to reproduce a debug environment: You can find the failure logs in *.log.1.xz files in * https://ci.linaro.org/job/tcwg_gnu_cross_check_gcc--master-aarch64-precommit/83/artifact/artifacts/artifacts.precommit/00-sumfiles/ The full lists of regressions and improvements as well as configure and make commands are in * https://ci.linaro.org/job/tcwg_gnu_cross_check_gcc--master-aarch64-precommit/83/artifact/artifacts/artifacts.precommit/notify/ The list of [ignored] baseline and flaky failures are in * https://ci.linaro.org/job/tcwg_gnu_cross_check_gcc--master-aarch64-precommit/83/artifact/artifacts/artifacts.precommit/sumfiles/xfails.xfail Current build : https://ci.linaro.org/job/tcwg_gnu_cross_check_gcc--master-aarch64-precommit/83/artifact/artifacts Reference build : https://ci.linaro.org/job/tcwg_gnu_cross_check_gcc--master-aarch64-build/2420/artifact/artifacts Warning: we do not enable maintainer-mode nor automatically update generated files, which may lead to failures if the patch modifies the master files. ```
Some checks failed
/ testjob (pull_request) Has been cancelled
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u fix/float-comparison:antoyo-fix/float-comparison
git switch antoyo-fix/float-comparison

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch trunk
git merge --no-ff antoyo-fix/float-comparison
git switch antoyo-fix/float-comparison
git rebase trunk
git switch trunk
git merge --ff-only antoyo-fix/float-comparison
git switch antoyo-fix/float-comparison
git rebase trunk
git switch trunk
git merge --no-ff antoyo-fix/float-comparison
git switch trunk
git merge --squash antoyo-fix/float-comparison
git switch trunk
git merge --ff-only antoyo-fix/float-comparison
git switch trunk
git merge antoyo-fix/float-comparison
git push origin trunk
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
gcc/gcc-TEST!97
No description provided.