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: unassignedb...@nondot.org
Reporter: gabrav...@gmail.com
CC: llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs