<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">I don’t have a strong opinion on this. The current GEP syntax is more restrictive and the single base pointer case can be emulated using a broadcast + vector-gep, that can easily be patten matched at codegen time. The problem with the current syntax is that the ‘broadcast’ instruction can be hoisted outside of loops and this can be a problem with our "one block at a time" codegen implementation. This problem can be solved by sinking the broadcast instruction at codegen-prepare time. </div><div class=""><br class=""></div><div class="">Is there a strong motivation to prefer one representation over the other?</div><div class=""><br class=""></div><br class=""><div><blockquote type="cite" class=""><div class="">On Mar 1, 2015, at 2:10 AM, Demikhovsky, Elena <<a href="mailto:elena.demikhovsky@intel.com" class="">elena.demikhovsky@intel.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><font face="Calibri" size="2" style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-size: 11pt;" class=""><div class="">Hi,</div><div class=""> </div><div class="">According to the current GEP syntax, vector GEP requires that each index must be a vector with the same number of elements.</div><div class=""> </div><div class="">%A = getelementptr <4 x i8*> %ptrs, <4 x i64> %offsets</div><div class=""> </div><div class="">I propose to lessen this requirement. Let each index be or vector or scalar. All vector indices must have the same number of elements. The scalar value will mean the splat vector value.</div><div class=""> </div><div class="">%A = getelementptr i8* %ptr, <4 x i64> %offsets</div><div class="">or</div><div class="">%A = getelementptr <4 x i8*> %ptrs, i64 %offset</div><div class=""> </div><div class="">In this case we don’t have to add a “broadcast” before GEP. It is actually will be developer’s decision what form to choose.</div><div class="">I plan to use vector GEP in gather/scatter and the “broadcasting” of the scalar value impedes to narrow this operation to the “common base, multiple indices” form in the future.</div><div class=""> </div><div class="">What do you think?</div><div class="">Thanks.</div><div class=""> </div><ul style="margin: 0px; padding-left: 36pt;" class=""><font face="Times New Roman" size="3" color="#31849B" class=""><span style="font-size: 12pt;" class=""><li class=""><b class=""><i class="">Elena</i></b></li></span></font></ul><div class=""> </div><div class=""> </div><div class=""> </div></span></font><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class=""></span><p style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">---------------------------------------------------------------------<br class="">Intel Israel (74) Limited</p><p style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">This e-mail and any attachments may contain confidential material for<br class="">the sole use of the intended recipient(s). Any review or distribution<br class="">by others is strictly prohibited. If you are not the intended<br class="">recipient, please contact the sender and delete all copies.</p></div></blockquote></div><br class=""></body></html>