This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix regression introduced by 88069
On Wed, Nov 21, 2018 at 3:23 PM Jeff Law <law@redhat.com> wrote:
>
> On 11/21/18 7:21 AM, Richard Biener wrote:
> > On Wed, Nov 21, 2018 at 3:28 AM Jeff Law <law@redhat.com> wrote:
> >>
> >> Richi's recent change to fix 88069 is causing various targets to fail
> >> tree-ssa/20030711-2.c. That test is verifying a variety of
> >> optimizations occur during the first DOM pass.
> >>
> >> Prior to Richi's change FRE1 would do some significant cleanups of the
> >> IL and as a result DOM was fully able to optimize the resultant code.
> >
> > Hum... I obviously missed the FAIL during testing somehow. FRE1
> > behavior shouldn't change so I'll fixup.
> NP. The change to DOM is probably a good thing independently. I may go
> back and factor that little hunk into a reusable function as we've got a
> nearly identical copy elsewhere.
I am testing the following.
Richard.
2018-11-21 Richard Biener <rguenther@suse.de>
PR tree-optimization/88069
* tree-ssa-sccvn.c (visit_phi): Tweak previous fix to not
apply to default defs.
Index: gcc/tree-ssa-sccvn.c
===================================================================
--- gcc/tree-ssa-sccvn.c (revision 266345)
+++ gcc/tree-ssa-sccvn.c (working copy)
@@ -4205,6 +4205,7 @@ visit_phi (gimple *phi, bool *inserted,
given that allows us to escape a region in alias walking. */
|| (sameval
&& TREE_CODE (sameval) == SSA_NAME
+ && !SSA_NAME_IS_DEFAULT_DEF (sameval)
&& SSA_NAME_IS_VIRTUAL_OPERAND (sameval)
&& (SSA_VAL (sameval, &visited_p), !visited_p)))
/* Note this just drops to VARYING without inserting the PHI into
> jeff