[llvm-dev] Suggestions on code generation for SIMD

Amara Emerson via llvm-dev llvm-dev at lists.llvm.org
Mon Jan 8 11:30:25 PST 2018

> On 6 Jan 2018, at 00:26, Linchuan Chen via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> Hi everyone,
> 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
> steps and tool set that I need to use to generate those.
> I also have a confusion on the following problems:
> Do people usually generate SIMD code at source code level, using __m512?
> If not, does LLVM have corresponding IR instructions for the SIMD registers and instructions?
> 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!

Hi Linchuan,

I believe clang supports Intel AVX512 intrinsics so it should be possible to generate vector code using that.

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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180108/a0dd8652/attachment.html>

More information about the llvm-dev mailing list