I'm investigating #50142, trying to reduce any_true to all_true , reproducible example code gives this godbolt:
#include <stdint.h>
int all_true(uint8_t *a) {
int8_t r = 1;
for (int i = 0 ; i < 16 ; i++) {
r &= !!a[i];
}
return r;
}
I changed int8_t r = 1 to int8_t r= 0, and r &= !!a[i] to r |= !!a[i] and the code degenerates completely (not even vectorized as any_true or all_true).
The godbolt link is here