On Fri, Jan 29, 2021 at 11:18:54AM -0800, sunil.k.pandey via Gcc-patches wrote: > On Linux/x86_64, > > a7f52181a6a16bb6d216ff41d9c6a9da95c19b5c is the first bad commit > commit a7f52181a6a16bb6d216ff41d9c6a9da95c19b5c > Author: Richard Biener <rguent...@suse.de> > Date: Fri Jan 29 16:02:36 2021 +0100 > > rtl-optimization/98863 - tame i386 specific RPAD pass > > caused > > FAIL: gcc.c-torture/compile/20051216-1.c -O1 (internal compiler error) > FAIL: gcc.c-torture/compile/20051216-1.c -O1 (test for excess errors)
I can reproduce it. The problem is that we don't revert the df flags back. The following patch fixes it, ok for trunk if it passes bootstrap/regtest? 2021-01-29 Jakub Jelinek <ja...@redhat.com> * config/i386/i386-features.c (remove_partial_avx_dependency): Remember whether DF_DEFER_INSN_RESCAN has been active before or not, and reset it to previous state. * gcc.target/i386/20051216-1.c: New test. --- gcc/config/i386/i386-features.c.jj 2021-01-29 20:39:10.561912947 +0100 +++ gcc/config/i386/i386-features.c 2021-01-29 20:59:06.254740315 +0100 @@ -2273,7 +2273,7 @@ remove_partial_avx_dependency (void) auto_vec<rtx_insn *> control_flow_insns; /* We create invalid RTL initially so defer rescans. */ - df_set_flags (DF_DEFER_INSN_RESCAN); + int prev_df_flags = df_set_flags (DF_DEFER_INSN_RESCAN); FOR_EACH_BB_FN (bb, cfun) { @@ -2409,6 +2409,8 @@ remove_partial_avx_dependency (void) } df_process_deferred_rescans (); + if ((prev_df_flags & DF_DEFER_INSN_RESCAN) == 0) + df_clear_flags (DF_DEFER_INSN_RESCAN); bitmap_obstack_release (NULL); BITMAP_FREE (convert_bbs); --- gcc/testsuite/gcc.target/i386/20051216-1.c.jj 2021-01-29 21:06:20.386960652 +0100 +++ gcc/testsuite/gcc.target/i386/20051216-1.c 2021-01-29 21:03:17.599973093 +0100 @@ -0,0 +1,5 @@ +/* PR rtl-optimization/25432 */ +/* { dg-do compile } */ +/* { dg-options "-O1 -march=cascadelake" } */ + +#include "../../gcc.c-torture/compile/20051216-1.c" Jakub