expmed.c
199 KB
-
Use extract_bit_field_as_subreg for vectors · b194a722
extract_bit_field_1 tries to use vec_extract to extract part of a vector. However, if that pattern isn't defined or if the operands aren't suitable, another good approach is to try a direct subreg reference. This is particularly useful for multi-vector modes on SVE (e.g. when extracting one vector from an LD2 result). The function would go on to try the same thing anyway, but only if there is an integer mode with the same size as the vector mode, which isn't true for SVE modes (and doesn't seem a good thing to require in general). Even when there is an integer mode, doing the operation on the original modes avoids some unnecessary bitcasting. 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org> Alan Hayward <alan.hayward@arm.com> David Sherwood <david.sherwood@arm.com> gcc/ * expmed.c (extract_bit_field_1): For vector extracts, fall back to extract_bit_field_as_subreg if vec_extract isn't available. Co-Authored-By: Alan Hayward <alan.hayward@arm.com> Co-Authored-By: David Sherwood <david.sherwood@arm.com> From-SVN: r256209
Richard Sandiford committed