r278964 - in /trunk/gcc: ChangeLog fold-const.c...

rsandifo@gcc.gnu.org rsandifo@gcc.gnu.org
Wed Dec 4 13:14:00 GMT 2019


Author: rsandifo
Date: Wed Dec  4 13:14:20 2019
New Revision: 278964

URL: https://gcc.gnu.org/viewcvs?rev=278964&root=gcc&view=rev
Log:
Fix VIEW_CONVERT_EXPRs for VECTOR_BOOLEAN_TYPE_Ps

In r278410 I added code to handle VIEW_CONVERT_EXPRs between
variable-length vectors.  This included support for decoding
a VECTOR_BOOLEAN_TYPE_P with subbyte elements.

However, it turns out that we were already mishandling such bool vectors
for fixed-length vectors: we treated each element as a stand-alone byte
instead of putting multiple elements into the same byte.  I think in
principle this could have been an issue for AVX512 as well.

This patch adds encoding support for boolean vectors and reuses
a version of the new decode support for fixed-length vectors.

2019-12-04  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
	* fold-const.c (native_encode_vector_part): Handle
	VECTOR_BOOLEAN_TYPE_Ps that have subbyte precision.
	(native_decode_vector_tree): Delete, moving the bulk of the code to...
	(native_interpret_vector_part): ...this new function.  Use a pointer
	and length instead of a vec<> and start index.
	(native_interpret_vector): Use native_interpret_vector_part.
	(fold_view_convert_vector_encoding): Likewise.

gcc/testsuite/
	* gcc.target/aarch64/sve/acle/general/whilelt_5.c: New test.

Added:
    trunk/gcc/testsuite/gcc.target/aarch64/sve/acle/general/whilelt_5.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/fold-const.c
    trunk/gcc/testsuite/ChangeLog



More information about the Gcc-cvs mailing list