r256616 - in /trunk/gcc: ChangeLog fold-const.c...
rsandifo@gcc.gnu.org
rsandifo@gcc.gnu.org
Sat Jan 13 17:57:00 GMT 2018
Author: rsandifo
Date: Sat Jan 13 17:57:17 2018
New Revision: 256616
URL: https://gcc.gnu.org/viewcvs?rev=256616&root=gcc&view=rev
Log:
Fix folding of vector mask EQ/NE expressions
fold_binary_loc assumed that if the type of the result wasn't a vector,
the operands wouldn't be either. This isn't necessarily true for
EQ_EXPR and NE_EXPR of vector masks, which can return a single scalar
for the mask as a whole.
2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
gcc/
* fold-const.c (fold_binary_loc): Check the argument types
rather than the result type when testing for a vector operation.
gcc/testsuite/
* gcc.target/aarch64/sve/vec_bool_cmp_1.c: New test.
* gcc.target/aarch64/sve/vec_bool_cmp_1_run.c: Likweise.
Added:
trunk/gcc/testsuite/gcc.target/aarch64/sve/vec_bool_cmp_1.c
trunk/gcc/testsuite/gcc.target/aarch64/sve/vec_bool_cmp_1_run.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/fold-const.c
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-cvs
mailing list