List of LLVM intrinsics implemented for ISPC

151 views
Skip to first unread message

Vishal Sharma

unread,
Feb 27, 2015, 12:48:30 AM2/27/15
to ispc...@googlegroups.com
 
 Hi ISPC developers and everyone,

 First, thanks to ispc developers for releasing an open source version of Intel's SIMD compiler!

 I recently started playing around with ispc. I am trying to extend an llvm transformation pass kulfi so that it could work on llvm-ir generated by ispc.

 While looking at the llvm-ir code emitted for some of the example ispc codes, I noticed there are some llvm intrinsic definitions. I am listing some of them below:

declare <8 x float> @llvm.x86.avx.max.ps.256(<8 x float>, <8 x float>) nounwind readnone
declare <8 x float> @llvm.x86.avx.min.ps.256(<8 x float>, <8 x float>) nounwind readnone
declare i32 @llvm.x86.avx.movmsk.ps.256(<8 x float>) nounwind readnone
declare void @llvm.x86.avx.maskstore.ps.256(i8*, <8 x float>, <8 x float>) nounwind
declare <8 x float> @llvm.x86.avx.blendv.ps.256(<8 x float>, <8 x float>, <8 x float>) nounwind readnone


 I have following questions:
 1. Where can I find the complete list of llvm intrinsics implemented for ispc?
 2. Also, where can I find the table entries and code generation rules for these intrinsics?

 Sorry if these are repeat questions and thanks in advance!!

  Vishal

Matt Pharr

unread,
Feb 27, 2015, 12:52:42 AM2/27/15
to ispc...@googlegroups.com
Unfortunately this is a slightly tricky question to give a good answer to...

Those intrinsics are all part of core LLVM; there are "declare" statements for all of the ones that ispc uses in the builtins/* files in the ispc distribution.

On the LLVM side, those aren't super well documented.  My experience has generally been to say "I want such and such x86 instruction", look for that instruction in the Instructions.td file in the LLVM distribution, and then figure out which LLVM intrinsic maps to that instruction. This is admittedly ugly, but I don't think that they are documented directly.

I hope this is helpful!

Thanks,
Matt


--
You received this message because you are subscribed to the Google Groups "Intel SPMD Program Compiler Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ispc-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Vishal Sharma

unread,
Feb 27, 2015, 12:58:10 AM2/27/15
to ispc...@googlegroups.com

Hi Matt,

 

Thanks, these are great pointers!

 

I’ll do the further dig in.

 

Thanks,

Vishal

Reply all
Reply to author
Forward
0 new messages