simplify-rtx.c
208 KB
-
Extra subreg fold for variable-length CONST_VECTORs · 646e47bc
The SVE support for the new CONST_VECTOR encoding needs to be able to extract the first N bits of the vector and duplicate it. This patch adds a simplify_subreg rule for that. The code is covered by the gcc.target/aarch64/sve_slp_*.c tests. 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org> gcc/ * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes parameter and use it instead of GET_MODE_SIZE (innermode). Use inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode). Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of GET_MODE_NUNITS (innermode). Also add a first_elem parameter. Change innermode from fixed_mode_size to machine_mode. (simplify_subreg): Update call accordingly. Handle a constant-sized subreg of a variable-length CONST_VECTOR. From-SVN: r256610
Richard Sandiford committed