-
- Downloads
vect: Allow vconds between different vector sizes
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. gcc/ * optabs-tree.c (expand_vec_cond_expr_p): Allow the compared values and the selected values to have different mode sizes. * gimple-isel.cc (gimple_expand_vec_cond_expr): Likewise.
Loading
Please register or sign in to comment