From 8c955a4b9ca99dc1557dd4547068abf7a0838c8f Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Tue, 30 Jul 2019 08:57:35 +0000 Subject: [PATCH] re PR tree-optimization/91291 (gcc.dg/20020312-2.c FAILs) 2019-07-30 Richard Biener PR tree-optimization/91291 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Ignore constant values. From-SVN: r273903 --- gcc/ChangeLog | 6 ++++++ gcc/tree-ssa-sccvn.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f69542dc536..1f71491727f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-07-30 Richard Biener + + PR tree-optimization/91291 + * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Ignore + constant values. + 2019-07-30 Jakub Jelinek PR middle-end/91216 diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c index a2cb237293e..23f7400f2e9 100644 --- a/gcc/tree-ssa-sccvn.c +++ b/gcc/tree-ssa-sccvn.c @@ -6253,7 +6253,8 @@ void rpo_elim::eliminate_push_avail (basic_block bb, tree leader) { tree valnum = VN_INFO (leader)->valnum; - if (valnum == VN_TOP) + if (valnum == VN_TOP + || is_gimple_min_invariant (valnum)) return; if (dump_file && (dump_flags & TDF_DETAILS)) { -- 2.30.2