<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jun 19, 2013 at 7:29 AM, Renato Golin <span dir="ltr"><<a href="mailto:renato.golin@linaro.org" target="_blank">renato.golin@linaro.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="im">On 19 June 2013 11:32, Francois Pichet <span dir="ltr"><<a href="mailto:pichet2000@gmail.com" target="_blank">pichet2000@gmail.com</a>></span> wrote:<br>
</div><div class="gmail_extra"><div class="gmail_quote"><div class="im">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>I am talking about something like this:</div>

<div>     vldr    d16, [sp, #8]<br></div></div></blockquote><div><br></div></div><div>Hi Francois,</div><div><br></div><div>This is just using the offset, not updating the register (see ARM ARM A8.5). Post-increment only has meaning if you write-back the new value to the register like:</div>

<div><br></div><div>  vldr  d16, [sp], #8</div><div><br></div><div>Did you mean write-back? or just offset?</div><div class="im"><div><br></div></div></div></div></div></blockquote><div><br></div><div style>yes I mean just offset like :</div>
<div> vldr  d16, [sp], #8</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">
<div class="gmail_extra"><div class="gmail_quote"><div class="im"><div></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div dir="ltr"><div></div><div>Does anybody know any C/C++ code example that will generate such code (especially loop)? Is this supported by the auto-vectorizer?<br></div></div></blockquote><div></div></div></div><br></div>
<div class="gmail_extra">
It's not simple to go from a loop in C++ to an instruction in machine code, especially when you're considering the vectorizer. Today you can generate a post-indexing load, tomorrow a pre-indexing load, and the next day a simple offset. All depending on how the IR is constructed, changed and lowered, all of which change daily.</div>

<div class="gmail_extra"><br></div><div class="gmail_extra">The quickest and surest way to generate NEON instructions is with NEON intrinsics, but even so, LLVM is allowed to twist your code to generate better instructions than you have thought possible. You can try to create an IR that can generate post-indexed VLDRs on ARM, but that will not guarantee it'll generate the same on any other backend.<br>

</div><div class="gmail_extra"><br></div><div class="gmail_extra">A code that will generate post-indexed loads in ARM, might generate a completely different instruction on Intel, or on your backend. What you have to do is to understand the patterns that vectorized code has in IR, possibly copy what's been done by other backends to lower such IR, and make sure your backend uses the post-indexed load for the cases you care about.</div>

<div class="gmail_extra"><br></div><div class="gmail_extra">Makes sense?</div></div></blockquote><div><br></div><div style>yes... makes sense.. it is just not trivial to test if the post increment will work when generated via C/C++ code. I was just wondering if there was some simple C/C++ code snippets that would normally generate such post increment load for vector. Apparently not.</div>
<div style><br></div><div style><br></div></div></div></div>