On 11/11/2020 11:16, Richard Sandiford wrote:
[Andrew: cc:ing you in case this affects/helps GCN.]

The vcond code requires the compared vectors and the selected
vectors to have both the same size and the same number of elements
as each other.  But the operation makes logical sense even for
different vector sizes.  E.g. you could compare two V4SIs and
use the result to select between two V4DIs.

The underlying optab already allows the compared mode and the selected
mode to be specified separately.  Since the vectoriser now also
supports mixed vector sizes, I think we can simply remove the
equal-size check and just keep the equal-lanes check.  It's then
up to the target to decide which (if any) mixtures of sizes it
supports.

Tested on aarch64-linux-gnu and x86_64-linux-gnu.  OK to install?

If this doesn't work for GCN then I'll make it work! :-)

Andrew

Reply via email to