<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote">On Mon, Feb 2, 2015 at 10:59 AM, Chandler Carruth <span dir="ltr"><<a href="mailto:chandlerc@google.com" target="_blank">chandlerc@google.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 class="gmail_extra"><br><div class="gmail_quote"><span>On Mon, Feb 2, 2015 at 10:55 AM, Ahmed Bougacha <span dir="ltr"><<a href="mailto:ahmed.bougacha@gmail.com" target="_blank">ahmed.bougacha@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>Ah yes, the structs are what make it messy.</div><div><br></div><div>How about the more useful constraint:<br></div><div>- the (identical) base must point to a (possibly multidimensional) array of structs.</div><div><br></div><div>Then, the above holds, no?  No matter which path you take, you must point to a one of the contiguous structs, and if the index is different then the pointers can't alias.</div></blockquote><div><br></div></span><div>I don't really know what you're proposing.  However, note that I can nest arrays inside of structs and wrap structs in arrays, so I think I can essentially almost always arrange to have arrays which I can overflow to produce aliasing offsets.</div></div></div></div></blockquote><div><br></div><div>But that doesn't matter, no?  If AA is looking at two GEPs indexing into say [1 x {[0 x i32], i32}]:</div><div>- we can state that gep 0, 0, 0 and gep 0, 0, 1 don't alias</div><div>- even though gep 0, 0, 0, 1 and gep 0, 0, 1 can, since this is a different query.</div><div><br></div><div>So if you have say [1 x {i32, i32}], you can safely say that gep 0, i, 0 and gep 0, j, 1 can't alias.</div><div><br></div><div>Or maybe this is my core misunderstanding of the problem?</div><div> </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>What are you really trying to achieve here? Why is just modeling the math not sufficient here? </div></div></div></div></blockquote><div><br></div><div>See the originally attached testcase, where the load seems redundant, but we can't prove the two GEPs don't alias.</div><div><br></div><div>-Ahmed</div><div> </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"><span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Anyway, the help is much appreciated, thanks Chandler & Hal!</div></blockquote></span></div><br><br></div></div>
</blockquote></div><br></div></div>