aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-loop-interchange.cc
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2022-08-23 14:29:23 +0100
committerPhilip Herron <philip.herron@embecosm.com>2022-08-23 14:31:03 +0100
commit57f0c9d6464c95807e836844f3013ed67948a16e (patch)
tree2a6b2ddf4fb364ebbc3699bcede6f40466f80aaa /gcc/gimple-loop-interchange.cc
parent8d1a6deb4e69e7dc162e741377674cf03459bcd9 (diff)
parentbaa3ffb19c54fa334ac2884f6acb5d31aa79ac32 (diff)
downloadgcc-57f0c9d6464c95807e836844f3013ed67948a16e.zip
gcc-57f0c9d6464c95807e836844f3013ed67948a16e.tar.gz
gcc-57f0c9d6464c95807e836844f3013ed67948a16e.tar.bz2
Merge remote-tracking branch 'gcc/master' into phil/gcc-upstream-merge
This merges GCC as of baa3ffb19c54fa334ac2884f6acb5d31aa79ac32 into gccrs
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