https://bugs.llvm.org/show_bug.cgi?id=46902
Bug ID: 46902
Summary: Accessing element of struct prevents vectorization
Product: tools
Version: trunk
Hardware: All
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: opt
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
The following snippet:
include <stdint.h>$
struct foo;$
typedef struct foo {$
int x;$
} foo;$
$
void bar(unsigned char dst, unsigned char src,$
foo *f, int i_max) {$
for (int i = 0; i < i_max; i++)$
dst[i] = (src[i] + f->x);$
}$
cannot be vectorized by LLVM trunk. However, if f->x is replaced by an integer
passed as a parameter, it can be vectorized. This can be vectorized by GCC
trunk.
Tested on aarch64-linux
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs