[LLVMbugs] [Bug 16332] New: Vectorize loops with multiple exits
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Jun 14 13:27:05 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=16332
Bug ID: 16332
Summary: Vectorize loops with multiple exits
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Loop Optimizer
Assignee: unassignedbugs at nondot.org
Reporter: benny.kra at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
ICC can vectorize this loop, and this kind of loop is not uncommon:
int foo(int max, int *arr) {
int i;
for (i = 0; i < max; i++)
if (arr[i] != 0) break;
return i;
}
Looks simple but is quite impressive. I'm not sure how it decides that
widenening the load in the loop is legal.
The kernel becomes a pcmpeqd + movmskps + testl, with a bsf on the exit to get
the right return value.
--
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/20130614/09739141/attachment.html>
More information about the llvm-bugs
mailing list