[PATCH 06/25] Remove constant vec_select restriction.

Jeff Law law@redhat.com
Tue Sep 11 22:44:00 GMT 2018


On 9/5/18 5:49 AM, ams@codesourcery.com wrote:
> 
> The vec_select operator is documented to require a const_int for the lane
> selector operand, but GCN has an instruction that can select the lane at
> runtime, so it seems reasonable to remove this restriction.
> 
> This patch simply replaces assertions that the operand is constant with early
> exits from the optimizers.  I think it's reasonable that vec_select with a
> non-constant operand cannot be optimized, yet.
> 
> Also included is the necessary documentation tweak.
> 
> 2018-09-05  Andrew Stubbs  <ams@codesourcery.com>
> 
> 	gcc/
> 	* doc/rtl.texi: Adjust vec_select description.
> 	* simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
> 	non-constant selectors.
OK.  Seems like it could go in now since you're just early returning
rather than asserting -- it should affect any in-tree port.

jeff



More information about the Gcc-patches mailing list