r254311 - in /trunk/gcc: ChangeLog simplify-rtx.c

rsandifo@gcc.gnu.org rsandifo@gcc.gnu.org
Wed Nov 1 14:06:00 GMT 2017


Author: rsandifo
Date: Wed Nov  1 14:06:50 2017
New Revision: 254311

URL: https://gcc.gnu.org/viewcvs?rev=254311&root=gcc&view=rev
Log:
Use (CONST_VECTOR|GET_MODE)_NUNITS in simplify-rtx.c

This patch avoids some calculations of the form:

  GET_MODE_SIZE (vector_mode) / GET_MODE_SIZE (element_mode)

in simplify-rtx.c.  If we're dealing with CONST_VECTORs, it's better
to use CONST_VECTOR_NUNITS, since that remains constant even after the
SVE patches.  In other cases we can get the number from GET_MODE_NUNITS.

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

gcc/
	* simplify-rtx.c (simplify_const_unary_operation): Use GET_MODE_NUNITS
	and CONST_VECTOR_NUNITS instead of computing the number of units from
	the byte sizes of the vector and element.
	(simplify_binary_operation_1): Likewise.
	(simplify_const_binary_operation): Likewise.
	(simplify_ternary_operation): Likewise.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/simplify-rtx.c



More information about the Gcc-cvs mailing list