On 11/28/23 10:30, Jakub Jelinek wrote:
On Tue, Nov 28, 2023 at 02:19:36PM +0200, Manolis Tsamis wrote:
So, like this (so far untested)?

Note, the earlier posted patch passed bootstrap/regtest on
{powerpc64le,x86_64,i686}-linux.

Testing revealed this fails miserably, artificial uses don't really
have DF_REF_INSN, so I'm now retrying with this which first punts
on non-regular uses (hoping non-regular uses are always the same
between -g and -g0) and only continuing on DEBUG_INSNs for the regular
uses.

2023-11-28  Jakub Jelinek  <ja...@redhat.com>

        PR bootstrap/111601
        * fold-mem-offsets.cc (get_uses): Ignore DEBUG_INSN uses.  Otherwise,
        punt if use is in a different basic block from INSN or appears before
        INSN in the same basic block.  Formatting fixes.
        (get_single_def_in_bb): Formatting fixes.
        (fold_offsets_1, pass_fold_mem_offsets::execute): Comment formatting
        fixes.

        * g++.dg/opt/pr111601.C: New test.
OK if it passes your testing.

jeff

Reply via email to