<div dir="ltr"><br clear="all"><div><span style="font-size:12.800000190734863px">Hi all,</span><div style="font-size:12.800000190734863px"><br></div><div style="font-size:12.800000190734863px">Recently I compiled the attached .c file using Clang with "-mavx2 -mfma -m32 -O3" optimization flags. </div><div style="font-size:12.800000190734863px"><br></div><div style="font-size:12.800000190734863px">First I used -emit-llvm and inspected the LLVM IR and there are no vector instructions. Then I got the assembly output of the file in it I can clearly see vector instructions in it.</div><div style="font-size:12.800000190734863px"><br></div><div style="font-size:12.800000190734863px">Neither the SLPVectorizer or the LoopVectorizer is however doing any vectorization (also checked it using -debug-only flag) as witnessed by the LLVM IR dump. </div><div style="font-size:12.800000190734863px"><br></div><div style="font-size:12.800000190734863px">Therefore, the vectorization should happen in the backend(?). </div><div style="font-size:12.800000190734863px"><br></div><div style="font-size:12.800000190734863px">Can I know whether the x86 backend does additional vectorization of scalar code and if so in which passes?</div><div style="font-size:12.800000190734863px"><br></div><div style="font-size:12.800000190734863px">NB - I posed the same question with the source files in a previous email, but the limit of 100kB was reached.</div><div style="font-size:12.800000190734863px"><br></div><div style="font-size:12.800000190734863px">Thank You.</div></div>-- <br><div class="gmail_signature"><div dir="ltr"><div>Kind regards,<br>Charith Mendis<br><br>Graduate Student,<div>CSAIL,<br><div>Massachusetts Institute of Technology</div></div></div></div></div>
</div>