[LLVMdev] Haswell New Instructions

Chris Lattner clattner at apple.com
Mon Jun 13 09:41:18 PDT 2011


On Jun 13, 2011, at 6:48 AM, Dan Gohman wrote:

> On Jun 13, 2011, at 4:41 AM, Nicolas Capens wrote:
>> 
>> So I was wondering whether in LLVM a gather operation is best represented with a 'load' instruction taking vector operands, or whether it's better to define it as a separate 'gather' instruction. What would be the pros and cons of each approach, and what do you think should be the long-term goals for the LLVM instruction set?
> 
> Lots of parts of LLVM "know" about loads, and would be quite broken if
> loads could suddenly be gathers.
> 
> Also, autovectorizers have to know a fair amount about target
> instruction sets, especially if they're going to vectorize non-trivial things
> like gathers.
> 
> So target-specific intrinsics seem like a reasonable start.  A generic
> 'gather' instruction/intrinsic may make sense at some point, if it can
> be designed cleanly enough.

Right, the natural evolution of LLVM IR is that things start out as intrinsics, then eventually get built into the instruction set if it makes sense.  This is how unaligned loads were handled early on, for example.

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


More information about the llvm-dev mailing list