On 5/24/19 4:33 AM, David Hildenbrand wrote:
> + /* identify the smaller element */
> + if (first_inequal < 16) {
> + uint8_t enr = first_inequal / (1 << es);
> + uint32_t a = s390_vec_read_element(v2, enr, es);
> + uint32_t b = s390_vec_read_element(v3, enr, es);
> +
> + smaller = a < b;
> + }
> +
> + if (zs) {
> + z0 = zero_search(a0, mask);
> + z1 = zero_search(a1, mask);
> + first_zero = match_index(z0, z1);
> + }
> +
> + s390_vec_write_element64(v1, 0, MIN(first_inequal, first_zero));
> + s390_vec_write_element64(v1, 1, 0);
> + if (first_zero == 16 && first_inequal == 16) {
> + return 3;
> + } else if (first_zero < first_inequal) {
> + return 0;
> + }
> + return smaller ? 1 : 2;
Perhaps move the computation of smaller down here where it is used.
Otherwise,
Reviewed-by: Richard Henderson <[email protected]>
r~