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. Co-Authored-By: Alan Hayward <alan.hayward@arm.com> Co-Authored-By: David Sherwood <david.sherwood@arm.com> From-SVN: r254311
Showing
Please
register
or
sign in
to comment