re PR target/89474 (ice in df_reg_chain_verify_unmarked, at df-scan.c:3995)

PR target/89474
	* config/i386/i386.c (remove_partial_avx_dependency): Call
	df_analyze etc. before creation of the v4sf_const0 pseudo, rather than
	after changing possibly many instructions to use that pseudo.  Fix up
	insertion of v4sf_const0 setter at the start of bb.

	* gcc.target/i386/pr89474.c: New test.

From-SVN: r269206
This commit is contained in:
Jakub Jelinek 2019-02-26 11:08:29 +01:00
parent d831b1ec03
commit ba790e6f5e
5 changed files with 56 additions and 17 deletions

View file

@ -1,13 +1,19 @@
2019-02-26 Jakub Jelinek <jakub@redhat.com>
PR target/89474
* config/i386/i386.c (remove_partial_avx_dependency): Call
df_analyze etc. before creation of the v4sf_const0 pseudo, rather than
after changing possibly many instructions to use that pseudo. Fix up
insertion of v4sf_const0 setter at the start of bb.
2019-02-25 Sandra Loosemore <sandra@codesourcery.com>
PR c/80409
* doc/extend.texi (Variadic Pointer Args): New section.
2019-02-25 Sandra Loosemore <sandra@codesourcery.com>
Martin Sebor <msebor@gmail.com>
* c-family/c.opt (Wmissing-attributes): Clean up doc string.
* common.opt (Wattribute-alias): Likewise.
* doc/invoke.texi (Option Summary): List general form of
-Wattribute-alias=. List positive form of -Wmissing-attributes.
@ -18,8 +24,6 @@
2019-02-25 Paul A. Clarke <pc@us.ibm.com>
[gcc]
* config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Fix big endian.
(_mm_cvtpd_ps): Likewise.
(_mm_cvttpd_epi32): Likewise.
@ -31,7 +35,6 @@
PR target/89339
* config/rs6000/xmmintrin.h (_mm_movemask_pi8): Fix 32-bit.
2019-02-25 Tamar Christina <tamar.christina@arm.com>
PR target/88530
@ -95,7 +98,6 @@
vfmlalq_lane_high_f16, vfmlslq_lane_high_f16, vfmlalq_laneq_high_f16,
vfmlslq_laneq_high_f16): ... To this.
2019-02-25 Alexander Monakov <amonakov@ispras.ru>
PR rtl-optimization/86096

View file

@ -1,3 +1,8 @@
2019-02-25 Sandra Loosemore <sandra@codesourcery.com>
Martin Sebor <msebor@gmail.com>
* c.opt (Wmissing-attributes): Clean up doc string.
2019-02-25 Jakub Jelinek <jakub@redhat.com>
PR c/89495

View file

@ -2835,7 +2835,14 @@ remove_partial_avx_dependency (void)
continue;
if (!v4sf_const0)
v4sf_const0 = gen_reg_rtx (V4SFmode);
{
calculate_dominance_info (CDI_DOMINATORS);
df_set_flags (DF_DEFER_INSN_RESCAN);
df_chain_add_problem (DF_DU_CHAIN | DF_UD_CHAIN);
df_md_add_problem ();
df_analyze ();
v4sf_const0 = gen_reg_rtx (V4SFmode);
}
/* Convert PARTIAL_XMM_UPDATE_TRUE insns, DF -> SF, SF -> DF,
SI -> SF, SI -> DF, DI -> SF, DI -> DF, to vec_dup and
@ -2883,12 +2890,6 @@ remove_partial_avx_dependency (void)
if (v4sf_const0)
{
calculate_dominance_info (CDI_DOMINATORS);
df_set_flags (DF_DEFER_INSN_RESCAN);
df_chain_add_problem (DF_DU_CHAIN | DF_UD_CHAIN);
df_md_add_problem ();
df_analyze ();
/* (Re-)discover loops so that bb->loop_father can be used in the
analysis below. */
loop_optimizer_init (AVOID_CFG_MODIFICATIONS);
@ -2904,11 +2905,23 @@ remove_partial_avx_dependency (void)
bb = get_immediate_dominator (CDI_DOMINATORS,
bb->loop_father->header);
insn = BB_HEAD (bb);
if (!NONDEBUG_INSN_P (insn))
insn = next_nonnote_nondebug_insn (insn);
set = gen_rtx_SET (v4sf_const0, CONST0_RTX (V4SFmode));
set_insn = emit_insn_before (set, insn);
insn = BB_HEAD (bb);
while (insn && !NONDEBUG_INSN_P (insn))
{
if (insn == BB_END (bb))
{
insn = NULL;
break;
}
insn = NEXT_INSN (insn);
}
if (insn == BB_HEAD (bb))
set_insn = emit_insn_before (set, insn);
else
set_insn = emit_insn_after (set,
insn ? PREV_INSN (insn) : BB_END (bb));
df_insn_rescan (set_insn);
df_process_deferred_rescans ();
loop_optimizer_finalize ();

View file

@ -1,3 +1,8 @@
2019-02-26 Jakub Jelinek <jakub@redhat.com>
PR target/89474
* gcc.target/i386/pr89474.c: New test.
2019-02-25 Jakub Jelinek <jakub@redhat.com>
PR c/77754

View file

@ -0,0 +1,14 @@
/* PR target/89474 */
/* { dg-do compile } */
/* { dg-options "-O2 -mavx" } */
int a;
void foo (double);
int baz (void);
void
bar (void)
{
while (baz ())
foo (a);
}