https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114190

--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:1157d5de35b41eabe5ee51d532224864173c37bd

commit r14-9329-g1157d5de35b41eabe5ee51d532224864173c37bd
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Wed Mar 6 09:35:37 2024 +0100

    i386: Fix up the vzeroupper REG_DEAD/REG_UNUSED note workaround [PR114190]

    When writing the rest_of_handle_insert_vzeroupper workaround to manually
    remove all the REG_DEAD/REG_UNUSED notes from the IL, I've missed that
    there is a df_analyze () call right after it and that the problems added
    earlier in the pass, like df_note_add_problem () done during mode
switching,
    doesn't affect just the next df_analyze () call right after it, but all
    other df_analyze () calls until the end of the current pass where
    df_finish_pass removes the optional problems.

    So, as can be seen on the following patch, the workaround doesn't actually
    work there, because while rest_of_handle_insert_vzeroupper carefully
removes
    all REG_DEAD/REG_UNUSED notes, the df_analyze () call at the end of the
    function immediately adds them in again (so, I must say I have no idea
    why the workaround worked on the earlier testcases).

    Now, I could move the df_analyze () call just before the
REG_DEAD/REG_UNUSED
    note removal loop, but I think the following patch is better, because
    the df_analyze () call doesn't have to recompute the problem when we don't
    care about it and will actively strip all traces of it away.

    2024-03-06  Jakub Jelinek  <ja...@redhat.com>

            PR rtl-optimization/114190
            * config/i386/i386-features.cc (rest_of_handle_insert_vzeroupper):
            Call df_remove_problem for df_note before calling df_analyze.

            * gcc.target/i386/avx-pr114190.c: New test.
  • [Bug rtl-optimization/114190] [... cvs-commit at gcc dot gnu.org via Gcc-bugs

Reply via email to