<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div><blockquote type="cite" class=""><div class="">On 6 Jan 2018, at 00:26, Linchuan Chen via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">Hi everyone,</div><div class=""><br class=""></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 class="">steps and tool set that I need to use to generate those.</div><div class=""><br class=""></div><div class="">I also have a confusion on the following problems:</div><div class=""><ol class=""><li class="">Do people usually generate SIMD code at source code level, using __m512?</li><li class="">If not, does LLVM have corresponding IR instructions for the SIMD registers and instructions?</li></ol><div class=""><br class=""></div><div class="">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 class=""><div class=""><br class=""></div><div class="">Hi Linchuan,</div><div class=""><br class=""></div><div class="">I believe clang supports Intel AVX512 intrinsics so it should be possible to generate vector code using that.</div><div class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class="">Cheers,</div><div class="">Amara</div></body></html>