Commit ba790e6f by Jakub Jelinek

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
parent d831b1ec
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> 2019-02-25 Sandra Loosemore <sandra@codesourcery.com>
PR c/80409 PR c/80409
* doc/extend.texi (Variadic Pointer Args): New section. * doc/extend.texi (Variadic Pointer Args): New section.
2019-02-25 Sandra Loosemore <sandra@codesourcery.com> 2019-02-25 Sandra Loosemore <sandra@codesourcery.com>
Martin Sebor <msebor@gmail.com> Martin Sebor <msebor@gmail.com>
* c-family/c.opt (Wmissing-attributes): Clean up doc string.
* common.opt (Wattribute-alias): Likewise. * common.opt (Wattribute-alias): Likewise.
* doc/invoke.texi (Option Summary): List general form of * doc/invoke.texi (Option Summary): List general form of
-Wattribute-alias=. List positive form of -Wmissing-attributes. -Wattribute-alias=. List positive form of -Wmissing-attributes.
...@@ -18,8 +24,6 @@ ...@@ -18,8 +24,6 @@
2019-02-25 Paul A. Clarke <pc@us.ibm.com> 2019-02-25 Paul A. Clarke <pc@us.ibm.com>
[gcc]
* config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Fix big endian. * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Fix big endian.
(_mm_cvtpd_ps): Likewise. (_mm_cvtpd_ps): Likewise.
(_mm_cvttpd_epi32): Likewise. (_mm_cvttpd_epi32): Likewise.
...@@ -31,7 +35,6 @@ ...@@ -31,7 +35,6 @@
PR target/89339 PR target/89339
* config/rs6000/xmmintrin.h (_mm_movemask_pi8): Fix 32-bit. * config/rs6000/xmmintrin.h (_mm_movemask_pi8): Fix 32-bit.
2019-02-25 Tamar Christina <tamar.christina@arm.com> 2019-02-25 Tamar Christina <tamar.christina@arm.com>
PR target/88530 PR target/88530
...@@ -95,7 +98,6 @@ ...@@ -95,7 +98,6 @@
vfmlalq_lane_high_f16, vfmlslq_lane_high_f16, vfmlalq_laneq_high_f16, vfmlalq_lane_high_f16, vfmlslq_lane_high_f16, vfmlalq_laneq_high_f16,
vfmlslq_laneq_high_f16): ... To this. vfmlslq_laneq_high_f16): ... To this.
2019-02-25 Alexander Monakov <amonakov@ispras.ru> 2019-02-25 Alexander Monakov <amonakov@ispras.ru>
PR rtl-optimization/86096 PR rtl-optimization/86096
......
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> 2019-02-25 Jakub Jelinek <jakub@redhat.com>
PR c/89495 PR c/89495
......
...@@ -2835,7 +2835,14 @@ remove_partial_avx_dependency (void) ...@@ -2835,7 +2835,14 @@ remove_partial_avx_dependency (void)
continue; continue;
if (!v4sf_const0) 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, /* Convert PARTIAL_XMM_UPDATE_TRUE insns, DF -> SF, SF -> DF,
SI -> SF, SI -> DF, DI -> SF, DI -> DF, to vec_dup and SI -> SF, SI -> DF, DI -> SF, DI -> DF, to vec_dup and
...@@ -2883,12 +2890,6 @@ remove_partial_avx_dependency (void) ...@@ -2883,12 +2890,6 @@ remove_partial_avx_dependency (void)
if (v4sf_const0) 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 /* (Re-)discover loops so that bb->loop_father can be used in the
analysis below. */ analysis below. */
loop_optimizer_init (AVOID_CFG_MODIFICATIONS); loop_optimizer_init (AVOID_CFG_MODIFICATIONS);
...@@ -2904,11 +2905,23 @@ remove_partial_avx_dependency (void) ...@@ -2904,11 +2905,23 @@ remove_partial_avx_dependency (void)
bb = get_immediate_dominator (CDI_DOMINATORS, bb = get_immediate_dominator (CDI_DOMINATORS,
bb->loop_father->header); 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 = 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_insn_rescan (set_insn);
df_process_deferred_rescans (); df_process_deferred_rescans ();
loop_optimizer_finalize (); loop_optimizer_finalize ();
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> 2019-02-25 Jakub Jelinek <jakub@redhat.com>
PR c/77754 PR c/77754
......
/* 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);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment