[llvm-bugs] [Bug 45718] New: Failure to merge loops with identi
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Apr 28 09:51:10 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=45718
Bug ID: 45718
Summary: Failure to merge loops with identi
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Loop Optimizer
Assignee: unassignedbugs at nondot.org
Reporter: gabravier at gmail.com
CC: llvm-bugs at lists.llvm.org
void f(int *__restrict a, int *__restrict b, size_t sz)
{
for (int i = 0; i < sz; ++i)
a[i] += b[i];
for (int i = 0; i < sz; ++i)
a[i] += b[i];
}
These two loops could be merged into a single one doing two additions per
iteration. ICC does this transformation, LLVM does not.
See also https://godbolt.org/z/YnCPNA
--
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/20200428/ad833c83/attachment.html>
More information about the llvm-bugs
mailing list