diff options
author | Jakub Jelinek <jakub@redhat.com> | 2024-03-06 09:35:37 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2024-03-06 09:35:37 +0100 |
commit | 1157d5de35b41eabe5ee51d532224864173c37bd (patch) | |
tree | 72246e28e6381c00826a49df62afdcb8be6bb3e3 /gcc/system.h | |
parent | 21edfb0051ed8d0ff46d5638c2bce2dd71f26d1f (diff) | |
download | gcc-1157d5de35b41eabe5ee51d532224864173c37bd.zip gcc-1157d5de35b41eabe5ee51d532224864173c37bd.tar.gz gcc-1157d5de35b41eabe5ee51d532224864173c37bd.tar.bz2 |
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 <jakub@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.
Diffstat (limited to 'gcc/system.h')
0 files changed, 0 insertions, 0 deletions