[wide-int] Fix fold_ternary VEC_PERM_EXPR handling

2013-11-02 Thread Richard Sandiford
The wide-int conversion for the fold_ternary VEC_PERM_EXPR case converted a mask of valid element numbers to an element count, which is one greater. The old code set need_mask_canon if an index was greater than the mask, but the new code sets it if an index is greater than the element count, givin

Re: [wide-int] Fix fold_ternary VEC_PERM_EXPR handling

2013-11-02 Thread Kenneth Zadeck
On 11/02/2013 07:14 AM, Richard Sandiford wrote: The wide-int conversion for the fold_ternary VEC_PERM_EXPR case converted a mask of valid element numbers to an element count, which is one greater. The old code set need_mask_canon if an index was greater than the mask, but the new code sets it i