http://llvm.org/bugs/show_bug.cgi?id=21369
Bug ID: 21369
Summary: Loop vectorization does not deal with a simple char
reduction
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Loop Optimizer
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
Clang currently cannot do a simple char reduction. The following program:
char arr[5000];
char f() {
char a = 0;
for (int i = 0; i < 5000; ++i)
a += arr[i];
return a;
}
Is not vectorized:
/bin/clang -O3 -o - -S test-vec.c -target arm64 -Rpass=loop-vectorize
-Rpass-analysis=loop-vectorize
test-vec.c:8:1: remark: loop not vectorized: value that could not be identified
as reduction is used outside the loop [-Rpass-analysis=loop-vectorize]
}
^
It is not immediately obvious what value has caused the vectorizer to bail out.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs