bitint: Use gsi_insert_on_edge rather than gsi_insert_on_edge_immediate [PR115887]
commit01dfc5b4add9a5ed48c46f6b25cde6e55b9f3ff1
authorJakub Jelinek <jakub@redhat.com>
Wed, 17 Jul 2024 15:32:21 +0000 (17 17:32 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 17 Jul 2024 15:43:04 +0000 (17 17:43 +0200)
tree87e9f1c2067b7db59e5726607e5c35c05eb081a7
parentd668f875985cf61d3a898d95cf01df90a720e5c2
bitint: Use gsi_insert_on_edge rather than gsi_insert_on_edge_immediate [PR115887]

The following testcase ICEs on x86_64-linux, because we try to
gsi_insert_on_edge_immediate a statement on an edge which already has
statements queued with gsi_insert_on_edge, and the deferral has been
intentional so that we don't need to deal with cfg changes in between.

The following patch uses the delayed insertion as well.

2024-07-17  Jakub Jelinek  <jakub@redhat.com>

PR middle-end/115887
* gimple-lower-bitint.cc (gimple_lower_bitint): Use gsi_insert_on_edge
instead of gsi_insert_on_edge_immediate and set edge_insertions to
true.

* gcc.dg/bitint-108.c: New test.

(cherry picked from commit 5104fe4c7808a66ed3041a8da8e4720585cc8a1f)
gcc/gimple-lower-bitint.cc
gcc/testsuite/gcc.dg/bitint-108.c [new file with mode: 0644]