i386, df: Fix up gcc.c-torture/compile/20051216-1.c -O1 -march=cascadelake
authorJakub Jelinek <jakub@redhat.com>
Sat, 30 Jan 2021 13:58:14 +0000 (14:58 +0100)
committerJakub Jelinek <jakub@redhat.com>
Sat, 30 Jan 2021 13:58:14 +0000 (14:58 +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)

The problem is that we don't revert the df flags back.
This patch fixes it by clearing DF_DEFER_INSN_RESCAN after
calling df_process_deferred_rescans, so that it doesn't leak into following
unprepared passes that expect non-deferred rescans.

2021-01-30  Jakub Jelinek  <jakub@redhat.com>

* config/i386/i386-features.c (remove_partial_avx_dependency): Clear
DF_DEFER_INSN_RESCAN after calling df_process_deferred_rescans.

* gcc.target/i386/20051216-1.c: New test.

gcc/config/i386/i386-features.c
gcc/testsuite/gcc.target/i386/20051216-1.c [new file with mode: 0644]

index c845ba90cafcf194c8cebf2588ac6da95c413835..c7d64822a13569a0089193cc20e3385f4fa1b218 100644 (file)
@@ -2409,6 +2409,7 @@ remove_partial_avx_dependency (void)
     }
 
   df_process_deferred_rescans ();
+  df_clear_flags (DF_DEFER_INSN_RESCAN);
   bitmap_obstack_release (NULL);
   BITMAP_FREE (convert_bbs);
 
diff --git a/gcc/testsuite/gcc.target/i386/20051216-1.c b/gcc/testsuite/gcc.target/i386/20051216-1.c
new file mode 100644 (file)
index 0000000..42a31d0
--- /dev/null
@@ -0,0 +1,5 @@
+/* PR rtl-optimization/25432 */
+/* { dg-do compile } */
+/* { dg-options "-O1 -march=cascadelake" } */
+
+#include "../../gcc.c-torture/compile/20051216-1.c"