Regarding the new uncounted loop vectorization capability in GCC 16: is
it a known current limitation that the 'simple' uncounted vectorization
example (i.e. gcc/testsuite/gcc.dg/vect/vect-uncounted_1.c) doesn't work
if you use an *unsigned* type for indexing?

This gets vectorized:

    int foo(int *haystack, int needle) {
        int i = 0;
        while (1) {
            if (haystack[i] == needle)
                return i;
            i++;
        }
    }

But this doesn't get vectorized:

    unsigned foo(int *haystack, int needle) {
        unsigned i = 0;
        while (1) {
            if (haystack[i] == needle)
                return i;
            i++;
        }
    }


Reply via email to