Re: Fix folding of vector mask EQ/NE expressions

2017-11-07 Thread Richard Biener
On Mon, Nov 6, 2017 at 8:19 PM, Marc Glisse wrote: > On Mon, 6 Nov 2017, Richard Sandiford wrote: > >> 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 retu

Re: Fix folding of vector mask EQ/NE expressions

2017-11-06 Thread Marc Glisse
On Mon, 6 Nov 2017, Richard Sandiford wrote: 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. Spell it VECTOR_

Fix folding of vector mask EQ/NE expressions

2017-11-06 Thread Richard Sandiford
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. Tested on aarch64-linux-gnu, x86_64-linux-gnu and powerpc64-linux