<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: Times New Roman; font-size: 12pt; color: #000000'><div><font class="Apple-style-span" size="3">The important thing IMO, is to not represent the gather operation as an instruction which takes a vector of pointers, because that's too restrictive for </font>architectures<font class="Apple-style-span" size="3"> with 64bits pointers. What one most frequently wants to do in those architectures is to specify a 64bit scalar </font>base pointer with a vector of 32bit offsets.  This fits what the VGATHERxxx described in the spec provides, and this fits what e.g. we need for efficient texture lookups in software rendering.</div><div><br></div><div>Whether this is represented by extending the load LLVM instruction to take "load pointer, offset", or by using a new "gather pointer, offset" LLVM instruction is a lesser issue IMO.</div><div style="color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: 12pt; "><br></div><div style="color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: 12pt; ">Jose</div><div style="color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: 12pt; "><br></div><div style="color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: 12pt; "><br></div><div style="color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: 12pt; "><div><hr id="zwchr"><blockquote style="border-left:2px solid rgb(16, 16, 255);margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--><div class="WordSection1"><p class="MsoNormal">Hi all,</p><p class="MsoNormal"> </p><p class="MsoNormal">Intel has just revealed its AVX2 instruction set, to be supported by the 2013 Haswell architecture, and it's looking quite revolutionary: <a href="http://software.intel.com/en-us/forums/showthread.php?t=83399&o=a&s=lr" target="_blank">http://software.intel.com/en-us/forums/showthread.php?t=83399&o=a&s=lr</a></p><p class="MsoNormal"> </p><p class="MsoNormal"> It includes powerful 'gather' instructions, which allow reading multiple vector elements from non-contiguous memory locations. It also extends all integer vector instructions to 256-bit, and can shift vector elements by independent counts. This offers tremendous opportunity for auto-vectorizing loops, since practically every scalar operation will have a direct vector equivalent. It also facilitates implementing throughput computing languages like OpenCL.</p><p class="MsoNormal"> </p><p class="MsoNormal">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?</p><p class="MsoNormal"> </p><p class="MsoNormal">Cheers,</p><p class="MsoNormal">Nicolas</p></div><br>_______________________________________________<br>LLVM Developers mailing list<br>LLVMdev@cs.uiuc.edu         http://llvm.cs.uiuc.edu<br>http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev<br></blockquote><br></div></div></div></body></html>