+2015-10-27 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gimple-match-head.c (maybe_push_res_to_seq): Use create_tmp_reg
+ instead of make_ssa_name if not yet in SSA form.
+
2015-10-27 Richard Biener <rguenther@suse.de>
* cfg.c (free_edge): Add function argument and use it instead of cfun.
&& SSA_NAME_OCCURS_IN_ABNORMAL_PHI (ops[2])))
return NULL_TREE;
if (!res)
- res = make_ssa_name (type);
+ {
+ if (gimple_in_ssa_p (cfun))
+ res = make_ssa_name (type);
+ else
+ res = create_tmp_reg (type);
+ }
maybe_build_generic_op (rcode, type, &ops[0], ops[1], ops[2]);
gimple *new_stmt = gimple_build_assign (res, rcode,
ops[0], ops[1], ops[2]);
}
gcc_assert (nargs != 0);
if (!res)
- res = make_ssa_name (type);
+ {
+ if (gimple_in_ssa_p (cfun))
+ res = make_ssa_name (type);
+ else
+ res = create_tmp_reg (type);
+ }
gimple *new_stmt = gimple_build_call (decl, nargs, ops[0], ops[1], ops[2]);
gimple_call_set_lhs (new_stmt, res);
gimple_seq_add_stmt_without_update (seq, new_stmt);