Make more use of simplify_gen_binary
commit53fdf12aa60bd3cc823cc99dbc36716ded8e3c50
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 21 Sep 2017 11:14:01 +0000 (21 11:14 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 21 Sep 2017 11:14:01 +0000 (21 11:14 +0000)
treeedc5c36cb2a56966dddefc63972cfbd2eefa465c
parent60ca8f8ec0edba0eb43bcaaa257ef46e2d68a90a
Make more use of simplify_gen_binary

This patch replaces various places that previously used:

  if (GET_CODE (y) == CONST_INT)
    ... plus_constant (..., x, [-]INTVAL (y)) ...
  else
    ... gen_rtx_PLUS/MINUS (..., x, y) ...

with single calls to simplify_gen_binary.  This allows
them to handle polynomial integers as well as constants.

2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
    Alan Hayward  <alan.hayward@arm.com>
    David Sherwood  <david.sherwood@arm.com>

gcc/
* calls.c (compute_argument_addresses): Use simplify_gen_binary
rather than choosing between plus_constant and gen_rtx_<CODE>.
* expr.c (emit_push_insn): Likewise.
(expand_expr_real_2): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@253059 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/calls.c
gcc/expr.c