Issue 150550
Summary [WebAssembly] Compiler can't recognize avgr_u pattern in C
Labels backend:WebAssembly
Assignees
Reporter badumbatish
    From @lukel97, currently the `avgr_u` is not recognized by the compiler in this godbolt https://godbolt.org/z/r6P1T6x9f

```C
void f(unsigned char *x, unsigned char *y, int n) {
  // should have been vectorized into avgr_u instead of seperated add and logical right shift
  for (int i = 0; i < n; i++)
    x[i] = (x[i] + y[i] + 1) / 2;
}
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to