]> git.ipfire.org Git - thirdparty/gcc.git/commit
lower-bitint: Handle unreleased SSA_NAMEs from earlier passes gracefully [PR113102]
authorJakub Jelinek <jakub@redhat.com>
Fri, 22 Dec 2023 11:28:06 +0000 (12:28 +0100)
committerJakub Jelinek <jakub@redhat.com>
Fri, 22 Dec 2023 11:28:06 +0000 (12:28 +0100)
commitf5198f0264e773d3b5d55f09a579313b0b231527
tree558a7967d6ec98620ea5a60e23b301e49dfaae0a
parentd3defa435e9d04d6ab6585ac184989941c7ad51e
lower-bitint: Handle unreleased SSA_NAMEs from earlier passes gracefully [PR113102]

On the following testcase earlier passes leave around an unreleased
SSA_NAME - non-GIMPLE_NOP SSA_NAME_DEF_STMT which isn't in any bb.
The following patch makes bitint lowering resistent against those,
the first hunk is where we'd for certain kinds of stmts try to ammend
them and the latter is where we'd otherwise try to remove them,
neither of which works.  The other loops over all SSA_NAMEs either
already also check gimple_bb (SSA_NAME_DEF_STMT (s)) or it doesn't
matter that much if we process it or not (worst case it means e.g.
the pass wouldn't return early even when it otherwise could).

2023-12-22  Jakub Jelinek  <jakub@redhat.com>

PR tree-optimization/113102
* gimple-lower-bitint.cc (gimple_lower_bitint): Handle unreleased
large/huge _BitInt SSA_NAMEs.

* gcc.dg/bitint-59.c: New test.
gcc/gimple-lower-bitint.cc
gcc/testsuite/gcc.dg/bitint-59.c [new file with mode: 0644]