<div dir="ltr">Thanks Amara so much for the info!<div><br></div><div>One more question: what do people usually do if they want to generate vectorized code for some existing c/c++ code? </div><div>Do they usually do C/C++ source level transformation, or do at LLVM's IR level? </div><div><br></div><div>I know clang supports auto vectorizations, such as loop vectorization and SLP, but they are not flexible enough if we </div><div>want to do more custom vectorizations or handle more complex cases, for example, SLP might not be able to handle </div><div>branches in the code (or may be latest version already can handle branches using mask).</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 8, 2018 at 11:30 AM, Amara Emerson via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space"><span class=""><div><blockquote type="cite"><div>On 6 Jan 2018, at 00:26, Linchuan Chen via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="m_-362332131631565623Apple-interchange-newline"><div><div dir="ltr"><div>Hi everyone,</div><div><br></div>I'm quite new to LLVM, but am working on a project that might need to generate some SIMD code using LLVM. The SIMD code will be using INTEL MIC intrinsics and I'm not sure about the<div>steps and tool set that I need to use to generate those.</div><div><br></div><div>I also have a confusion on the following problems:</div><div><ol><li>Do people usually generate SIMD code at source code level, using __m512?</li><li>If not, does LLVM have corresponding IR instructions for the SIMD registers and instructions?</li></ol><div><br></div><div>Since I'm new, I would appreciate any help that could give me some directions at any level. Some references would also help. Thanks in advance!</div></div></div></div></blockquote></div><br><div><br></div></span><div>Hi Linchuan,</div><div><br></div><div>I believe clang supports Intel AVX512 intrinsics so it should be possible to generate vector code using that.</div><div><br></div><div>For 2), LLVM has first class vector types such as <4 x i32> and can do the usual things on those types, including masking. The vectoriser is where most of the vector code that LLVM generates will originate from. These types aren’t target specific however, and there are no notions of vector “registers” at the IR level.</div><div><br></div><div>Cheers,</div><div>Amara</div></div><br>______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><span style="font-family:Arial;color:rgb(35,35,35);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">Sincerely,</span><div><span style="font-family:Arial;color:rgb(35,35,35);background-color:transparent;vertical-align:baseline;white-space:pre-wrap">Linchuan</span></div></div></div>
</div>