<div dir="ltr">Hey,<div><br></div><div style>I don't know either - I was quoting your analysis from the commit message. ;)</div><div style> </div><div class="gmail_extra">To be clear - I wasn't proposing a change to the definition of the IR, though that has crossed on my mind too. I'm saying that I think the DAGs actually rely on the alignment being non-zero. Your fix should make sure that it is, but to be safe I'd like to add asserts at the point where the alignment is actually used.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">Cheers,</div><div class="gmail_extra">Lang.<br><br><div class="gmail_quote">On Thu, Mar 28, 2013 at 12:10 AM, Chandler Carruth <span dir="ltr"><<a href="mailto:chandlerc@gmail.com" target="_blank">chandlerc@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div class="h5">On Wed, Mar 27, 2013 at 11:52 PM, Lang Hames <span dir="ltr"><<a href="mailto:lhames@gmail.com" target="_blank">lhames@gmail.com</a>></span> wrote:<br>
</div></div><div class="gmail_extra"><div class="gmail_quote"><div><div class="h5">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Hi Chandler, Dan,</div><div><div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">When alignment is zero, the lang ref says that *no* alignment<br>


assumptions can be made. This is the exact opposite of the internal API<br>
contracts of the DAG where alignment 0 indicates that the alignment can<br>
be made to be anything desired.<br></blockquote><div><br></div></div><div>I had occasion to circle back to this recently, and I wanted to double-check this part of the analysis. Is this actually an internal contract, and expected behavior? Or do things just go haywire when we feed in a zero alignment? On a local LLVM copy, I replaced your fix with an assert on zero-alignment, and added similar asserts to getMemcpyLoadsAndStores (and friends), but wasn't able to trigger them with anything in the test suite.</div>


<div><br></div><div>If it's not an internal contract, but just the DAG going haywire on Align==0, I'd like to keep your fix in place, and commit the asserts that I've added to getMemcpyLoadsAndStores and friends.</div>

</div></div></div></blockquote><div><br></div></div></div><div>My fix definitely was that the DAG went haywire on align == 0.</div><div><br></div><div>I'm not sure what you mean by 'internal contract'. The LangRef sets out the meaning of align==0 for memset and friends very explicitly. I'm OK if you want to change the langref to say something else, but it's not about adding asserts, it's about changing the langref, adding autoupgrade functionality, and teaching the verifier about this first.... then you can add asserts. =D</div>

<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">
<div><br></div><div>Cheers,</div><div>Lang.</div><div><br></div></div></div></div><div class="im">
<br>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br></div></blockquote></div><br></div></div>
</blockquote></div><br></div></div>