<html><head><base href="x-msg://31/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Jun 13, 2011, at 4:41 AM, Nicolas Capens wrote:</div><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div lang="EN-US" link="blue" vlink="purple"><div class="WordSection1" style="page: WordSection1; "><font class="Apple-style-span" color="#000000"><br></font><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; ">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?</div></div></div></span></blockquote><div><br></div><div>Lots of parts of LLVM "know" about loads, and would be quite broken if</div><div>loads could suddenly be gathers.</div><div><br></div><div>Also, autovectorizers have to know a fair amount about target</div><div>instruction sets, especially if they're going to vectorize non-trivial things</div><div>like gathers.</div><div><br></div><div>So target-specific intrinsics seem like a reasonable start. A generic</div><div>'gather' instruction/intrinsic may make sense at some point, if it can</div><div>be designed cleanly enough.</div><div><br></div><div>Dan</div><div><br></div></div></body></html>