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

--- Comment #16 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to JuzheZhong from comment #14)
> Also this case ICE:
> 
> typedef unsigned char __attribute__((vector_size(4))) uvec;
> 
> int main (int argc, char *argv[]) {
>     int i;
>     int x = 0;
>     uvec uc0 = (uvec) {argc, 1,  2,  10};
>     unsigned char uc1[4] = {0, 3, 2, 200};
>     signed char ucg[4] = {1, 0, 0, 0 };
>     signed char ucl[4] = {0, 1, 0, 1 };
> 
> #define uc0_ ((unsigned char *)&uc0)
> 
>     for (i = 0; i < 4; i ++) {
>       x |= ucg[i] != (uc0_[i] > uc1[i]);
>       x |= ucl[i] != (uc0_[i] < uc1[i]);
>     }
>     return x;
> }
> 
> during GIMPLE pass: isel
> dump file: auto.c.256t.isel
> auto.c: In function 'main':
> auto.c:3:5: internal compiler error: in gimple_expand_vec_cond_expr, at
> gimple-isel.cc:328
>     3 | int main (int argc, char *argv[]) {
>       |     ^~~~
> 0x1bb55bd gimple_expand_vec_cond_expr
>         ../../../../gcc/gcc/gimple-isel.cc:325
> 0x1bb57c6 execute
>         ../../../../gcc/gcc/gimple-isel.cc:390
> 
> 
> Looks odd, it ICE at gimple-isel.cc:
> 
> gcc_assert (VECTOR_BOOLEAN_TYPE_P (TREE_TYPE (op0))

I have a fix for the first issue.  For this one the issue seems to be that
we do have vec_cmp for _2 > { 0, 3, 2, 200 } when doing instruction
selection for

mask__11.18_97 = VEC_COND_EXPR <mask__9.15_92, { 0, -1, -1, -1 }, { -1, 0, 0, 0
}>;

note the value is of vector boolean type.  But we fail to have
vcond_maskV4BIV4BI.

ISTR we have fixed sth similar
by adding missing patterns with VnBImode result?  But maybe forgot about
VLS modes here?

Reply via email to