https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97706

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
I guess we're missing what usually is done by bool patterns here, namely
adding a conversion from the mask vector type produced by the comparison
to the value vector type.

A simple workaround would be to reject such PHIs but I wonder how many
other uses prevail.  I don't remember why we chose to assign a mask
vector type to the LHS of the comparisons.

For the SSE case adding compensation via a VIEW_CONVERT_EXPR is possible
but for the AVX512 mask case that's more involved:

> ./cc1 -quiet t.i -O3 -fdump-tree-slp-details -mavx512f -mavx512vl -mavx512bw 
t.i: In function 'foo':
t.i:3:6: error: incompatible types in 'PHI' argument 0
    3 | void foo(int n, char *p)
      |      ^~~
vector(16) unsigned char

vector(16) <signed-boolean:1>

vect_b0_104.7_123 = PHI <mask_b0_37.6_106(3)>

need to think about this.

Reply via email to