<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi,<br>
When I use "-loop-vectorize" to vectorize a loop as below:<br>
//====================================<br>
void bar(float *A, float* B, float K, int start, int end) {<br>
for (int i = start; i < end; ++i)<br>
A[i] *= B[i] + K;<br>
}<br>
//====================================<br>
First, I use "<b>clang -O0 -emit-llvm -S bar.c -o bar.l</b>" to
emit the .l file. <br>
Then I use "<b>opt -loop-vectorize -S bar.l -o bar.v.l</b>".
Unfortunately, the vectorization don't work. But I use "<b>opt -O3
-loop-vectorize -S bar.l -o bar.v.l</b>" and it works.<br>
My question is: What the information needed by "<b>-loop-vectorize</b>"
the "<b>-O3</b>" provides? Thanks.<br>
</body>
</html>