Make more use of GET_MODE_UNIT_SIZE
This patch uses GET_MODE_UNIT_SIZE instead of GET_MODE_SIZE in
cases where, for compound modes, the mode of the scalar elements
is what matters. E.g. the choice between truncation and extension
is really based on the modes of the consistuent scalars rather
than the mode as a whole.
None of the existing code was wrong. The patch simply makes
things easier when converting to variable-sized modes.
2017-10-13 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
gcc/
* optabs.c (add_equal_note): Use GET_MODE_UNIT_SIZE.
(widened_mode): Likewise.
(expand_unop): Likewise.
* ree.c (transform_ifelse): Likewise.
(merge_def_and_ext): Likewise.
(combine_reaching_defs): Likewise.
* simplify-rtx.c (simplify_unary_operation_1): Likewise.
Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>
From-SVN: r253715