Issue |
144614
|
Summary |
[WebAssembly] Degenerate case in vectorization of all true
|
Labels |
new issue
|
Assignees |
|
Reporter |
badumbatish
|
I'm investigating #50142, trying to reduce any_true to all_true , reproducible example code gives this [godbolt](https://godbolt.org/z/oze7dosYo):
```c
#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](https://godbolt.org/z/qcMPj1be9)
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs