aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-loop-interchange.cc
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2022-08-24 16:50:14 +0000
committerGitHub <noreply@github.com>2022-08-24 16:50:14 +0000
commitd3cf195ab46d7effe806990aa6b7a409bf8e46df (patch)
treeeb33d22a749417ad62a3fc87c2dc8cfb3452632a /gcc/gimple-loop-interchange.cc
parent825a44b40ce6cfa76470e53d0746b1e64b99ee5b (diff)
parent2e77960b14527ff216fa188479de9142fbb9d34c (diff)
downloadgcc-d3cf195ab46d7effe806990aa6b7a409bf8e46df.zip
gcc-d3cf195ab46d7effe806990aa6b7a409bf8e46df.tar.gz
gcc-d3cf195ab46d7effe806990aa6b7a409bf8e46df.tar.bz2
Merge #1498
1498: Merge from GCC upstream r=philberty a=philberty Lets see if it builds. Co-authored-by: GCC Administrator <gccadmin@gcc.gnu.org> Co-authored-by: Dimitrije Milošević <dimitrije.milosevic@syrmia.com> Co-authored-by: Aldy Hernandez <aldyh@redhat.com> Co-authored-by: Jakub Jelinek <jakub@redhat.com> Co-authored-by: Martin Liska <mliska@suse.cz> Co-authored-by: Roger Sayle <roger@nextmovesoftware.com> Co-authored-by: Sam Feifer <sfeifer@redhat.com> Co-authored-by: Andrew Stubbs <ams@codesourcery.com> Co-authored-by: Jose E. Marchesi <jose.marchesi@oracle.com> Co-authored-by: H.J. Lu <hjl.tools@gmail.com> Co-authored-by: David Malcolm <dmalcolm@redhat.com> Co-authored-by: Richard Biener <rguenther@suse.de> Co-authored-by: Immad Mir <mirimmad@outlook.com>
Diffstat (limited to 'gcc/gimple-loop-interchange.cc')
-rw-r--r--gcc/gimple-loop-interchange.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/gimple-loop-interchange.cc b/gcc/gimple-loop-interchange.cc
index 53adc02..71772b6 100644
--- a/gcc/gimple-loop-interchange.cc
+++ b/gcc/gimple-loop-interchange.cc
@@ -897,7 +897,9 @@ loop_cand::undo_simple_reduction (reduction_p re, bitmap dce_seeds)
/* Init new_var to MEM_REF or CONST depending on if it is the first
iteration. */
induction_p iv = m_inductions[0];
- cond = fold_build2 (NE_EXPR, boolean_type_node, iv->var, iv->init_val);
+ cond = make_ssa_name (boolean_type_node);
+ stmt = gimple_build_assign (cond, NE_EXPR, iv->var, iv->init_val);
+ gimple_seq_add_stmt_without_update (&stmts, stmt);
new_var = copy_ssa_name (re->var);
stmt = gimple_build_assign (new_var, COND_EXPR, cond, tmp, re->init);
gimple_seq_add_stmt_without_update (&stmts, stmt);
@@ -1703,9 +1705,9 @@ public:
{}
/* opt_pass methods: */
- opt_pass * clone () { return new pass_linterchange (m_ctxt); }
- virtual bool gate (function *) { return flag_loop_interchange; }
- virtual unsigned int execute (function *);
+ opt_pass * clone () final override { return new pass_linterchange (m_ctxt); }
+ bool gate (function *) final override { return flag_loop_interchange; }
+ unsigned int execute (function *) final override;
}; // class pass_linterchange