[llvm-bugs] [Bug 46902] New: Accessing element of struct prevents vectorization
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Jul 30 01:39:05 PDT 2020
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: unassignedbugs at nondot.org
Reporter: joel.hutton at arm.com
CC: llvm-bugs at lists.llvm.org
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200730/43300c3c/attachment-0001.html>
More information about the llvm-bugs
mailing list