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

            Bug ID: 122128
           Summary: Missed vectorization for boolean and from different
                    kind sources
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---

void foo (bool * __restrict a, char *b)
{
  for (int i = 0; i < 1024; ++i)
    {
      bool x = a[i];
      bool y = b[i] < 17;
      a[i] = x & y;
    }
}

ends up using a mask type for the compare and the bit-and but the load
produces a data type.   That eventually runs into

t2.c:3:21: note:   ==> examining statement: _7 = x_10 & y_12;
t2.c:3:21: note:   vect_is_simple_use: operand *_2, type of def: internal
t2.c:3:21: note:   vect_is_simple_use: operand _4 <= 16, type of def: internal
t2.c:3:21: missed:   mixed mask and nonmask vector types
t2.c:1:6: missed:   not vectorized: relevant stmt not supported: _7 = x_10 &
y_12;

Reply via email to