Remove constant vec_select restriction.
commitcfe4bb5d60337e8e4ee5dda08e68226187c0e950
authorams <ams@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 19 Sep 2018 13:25:42 +0000 (19 13:25 +0000)
committerams <ams@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 19 Sep 2018 13:25:42 +0000 (19 13:25 +0000)
tree9e07681483f902c00e17ec88d0fb16422b2d7a08
parentdeb2e908753c18aa3075ae792254894b508d6d75
Remove constant vec_select restriction.

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-19  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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@264423 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/doc/rtl.texi
gcc/simplify-rtx.c