Don't create SSA names until in SSA form
authorRichard Sandiford <richard.sandiford@arm.com>
Tue, 27 Oct 2015 09:07:44 +0000 (09:07 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Tue, 27 Oct 2015 09:07:44 +0000 (09:07 +0000)
commit4aecfe19869d2ba26ac4e4a967eb0b0cbf9b0114
tree5c7ab69d5dcde81019b8826f1021e3c8de37e6dc
parent61183076f1dfbea5ac4fb6799aab9bc6e9aa8de5
Don't create SSA names until in SSA form

An upcoming patch adds a fold from hypot(x,x) to fabs(x)*sqrt(2).
This is unusual in that it could trigger in the gimplifier but would
require new SSA names to be created.  This patch makes sure that we
use the usual:

  if (gimple_in_ssa_p (cfun))
    res = make_ssa_name (type);
  else
    res = create_tmp_reg (type);

formula to cope with cases where we're not yet in SSA form.

Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.

gcc/
* gimple-match-head.c (maybe_push_res_to_seq): Use create_tmp_reg
instead of make_ssa_name if not yet in SSA form.

From-SVN: r229406
gcc/ChangeLog
gcc/gimple-match-head.c