From: Jakub Jelinek Date: Tue, 26 Feb 2019 10:08:29 +0000 (+0100) Subject: re PR target/89474 (ice in df_reg_chain_verify_unmarked, at df-scan.c:3995) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ba790e6f5ede0967acd57324569715c147b1e870;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 94505990bcc..fdc72bbaef1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,13 +1,19 @@ +2019-02-26 Jakub Jelinek + + 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 PR c/80409 - * doc/extend.texi (Variadic Pointer Args): New section. 2019-02-25 Sandra Loosemore Martin Sebor - * 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 -[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 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 PR rtl-optimization/86096 diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 72d4fd2bfc5..da8918c5801 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,8 @@ +2019-02-25 Sandra Loosemore + Martin Sebor + + * c.opt (Wmissing-attributes): Clean up doc string. + 2019-02-25 Jakub Jelinek PR c/89495 diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index e77653d66a4..b8357a7db5d 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -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 (); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index dcd7c674307..3c90c8df084 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-02-26 Jakub Jelinek + + PR target/89474 + * gcc.target/i386/pr89474.c: New test. + 2019-02-25 Jakub Jelinek PR c/77754 diff --git a/gcc/testsuite/gcc.target/i386/pr89474.c b/gcc/testsuite/gcc.target/i386/pr89474.c new file mode 100644 index 00000000000..7d0dd9eac42 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr89474.c @@ -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); +}