[57/77] Use scalar_int_mode in expand_expr_addr_expr
commitfa8ce0e15e7bdbbf3774bb0a8d569685efdab221
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 30 Aug 2017 11:18:20 +0000 (30 11:18 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 30 Aug 2017 11:18:20 +0000 (30 11:18 +0000)
tree5748870db71e821da0effe7ffd9bba46b412170c
parentdc4880990d3a42a406be71ceee308315ffad7ec4
[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.

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