Skip to content
Snippets Groups Projects
Commit d93d3864 authored by Richard Sandiford's avatar Richard Sandiford Committed by Richard Sandiford
Browse files

[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: default avatarAlan Hayward <alan.hayward@arm.com>
Co-Authored-By: default avatarDavid Sherwood <david.sherwood@arm.com>

From-SVN: r251509
parent 8a92a3f3
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment