[57/77] Use scalar_int_mode in expand_expr_addr_expr
authorRichard Sandiford <richard.sandiford@linaro.org>
Wed, 30 Aug 2017 11:18:20 +0000 (11:18 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Wed, 30 Aug 2017 11:18:20 +0000 (11:18 +0000)
commitd93d3864ca8a8b50de81e084136574021463d228
tree5748870db71e821da0effe7ffd9bba46b412170c
parent8a92a3f3841992f9440236861a20c178f01f7c21
[57/77] Use scalar_int_mode in expand_expr_addr_expr

This patch rewrites the condition:

  if (tmode != address_mode && tmode != pointer_mode)
    tmode = address_mode;

to the equivalent:

  tmode == pointer_mode ? pointer_mode : address_mode

The latter has the advantage that the result is naturally
a scalar_int_mode; a later mechanical patch makes it one.

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

gcc/
* expr.c (expand_expr_addr_expr): Add a new_tmode local variable
that is always either address_mode or pointer_mode.

Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>
From-SVN: r251509
gcc/ChangeLog
gcc/expr.c