https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110228
--- Comment #13 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The big question is this code here:
```
unsigned a[4] = {1,1,1,1};
__attribute__((noipa))
void sink(int){}
__attribute__((noipa))
static void bug(unsigned & p, unsigned *t, int n) {
bool LookupFlags ;
for(int i = 0; i < n; i++) {
unsigned v = t[i];
if (v == 0)
LookupFlags = 0;
else {
bool t = v == 1;
LookupFlags = LookupFlags | t;
}
sink(LookupFlags);
p = LookupFlags;
}
}
int main() {
unsigned r = 42;
bug(r,a, sizeof(a)/sizeof(a[0]));
__builtin_printf("%u\n", r);
if (r != 1) __builtin_abort();
}
```
has undefined behavior in it? Right now we remove the whole `!= 0` if we use
with -O2.