Hi:<div>   I want to use clang auto-vectorization for this code:</div><div>```</div><div><p class="p1" style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: "Helvetica Neue";">#include <stdio.h></p><p class="p1" style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: "Helvetica Neue";">#include <stdint.h></p><p class="p2" style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: "Helvetica Neue"; min-height: 15px;"><br></p><p class="p1" style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: "Helvetica Neue";">void test() {</p><p class="p1" style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: "Helvetica Neue";"><span class="Apple-converted-space">  </span>int a[100];</p><p class="p1" style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: "Helvetica Neue";"><span class="Apple-converted-space">  </span>for (int64_t i = 0; i < 100; i++) {</p><p class="p1" style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: "Helvetica Neue";"><span class="Apple-converted-space">    </span>a[i] = i / 8;</p><p class="p1" style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: "Helvetica Neue";"><span class="Apple-converted-space">  </span>}</p><p class="p1" style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: "Helvetica Neue";"><span class="Apple-converted-space">  </span>printf("%ld %ld", a[0], a[99]);</p><p class="p1" style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: "Helvetica Neue";">}</p><p class="p2" style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: "Helvetica Neue"; min-height: 15px;"><br></p><p class="p1" style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: "Helvetica Neue";">int main(int argc, char** argv) {</p><p class="p1" style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: "Helvetica Neue";"><span class="Apple-converted-space">  </span>test();</p><p class="p1" style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 13px; line-height: normal; font-family: "Helvetica Neue";">}</p></div><div><div style="color: rgb(212, 212, 212); background-color: rgb(30, 30, 30); font-family: Menlo, Monaco, "Courier New", monospace; font-size: 12px; line-height: 18px; white-space: pre;"><div></div></div></div><div>```</div><div>It worked with this command: clang -S -O3 vector_divide.c  and it can get successfully vectorized asm.</div><div>But i want to use auto-vectorization as below:</div><div>clang -S -emit-llvm -mllvm -force-vector-width=8 vector_divide.c -o vec_dev.ll</div><div>opt -loop-vectorize -force-vector-width=8 -S vec_dev.ll -o vec_opt_dev.ll</div><div>clang -S vec_opt_dev.ll</div><div>Then it can't worked, what should i do?</div><div>yours, zhengxianli</div><div><br></div>