<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: arial,helvetica,sans-serif; font-size: 10pt; color: #000000'><br><hr id="zwchr"><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px; color: rgb(0, 0, 0); font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><b>From: </b>"Elena via llvm-dev Demikhovsky" <llvm-dev@lists.llvm.org><br><b>To: </b>"llvm-dev" <llvm-dev@lists.llvm.org><br><b>Sent: </b>Monday, July 25, 2016 9:45:55 AM<br><b>Subject: </b>[llvm-dev] Alias Analysis with inbound GEPs<br><br>



<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>

<font face="Calibri" size="2"><span style="font-size: 11pt;">
<div>Hi,</div>
<div> </div>
<div>I’m checking aliasing of two pointers:</div>
<div> </div>
<div>  %GEP1 = getelementptr inbounds %struct.s, %struct.s* %0, i64 0, i32 1, i64 %indvars.iv41, i64 %indvars.iv39</div>
<div>  %GEP2 = getelementptr inbounds %struct.s, %struct.s* %0, i64 0, i32 16</div>
<div> </div>
<div id="DWT16163">The result I got is “PartialAlias” because the indices of the GEP1 are variable.</div></span></font></blockquote>That seems like a bug. PartialAlias should only be returned when we can prove a partial overlap. Otherwise, MayAlias should be returned.<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px; color: rgb(0, 0, 0); font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><font face="Calibri" size="2"><span style="font-size: 11pt;"><div id="DWT16164">Shouldn’t the “inbounds” keyword mean that the access to sub-array is also in-bounds?</div></span></font></blockquote>No. inbounds applies only to the whole object.<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px; color: rgb(0, 0, 0); font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><font face="Calibri" size="2"><span style="font-size: 11pt;"><div></div>
<div id="DWT16165">I’m trying to reach “NoAlias” consensus between GEP1 and GEP2.</div></span></font></blockquote>Did the original code come from C or C++? What are we modeling here?<br><br> -Hal<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px; color: rgb(0, 0, 0); font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><font face="Calibri" size="2"><span style="font-size: 11pt;"><div></div>
<div> </div>
<div>Thanks.</div>
<div> </div>
<ul style="margin: 0pt; padding-left: 36pt;">
<font color="#2f5496" face="Times New Roman" size="3"><span style="font-size: 12pt;">
<li><b><i> Elena</i></b></li></span></font>
</ul>
<div> </div>
<div> </div>
<div> </div>
</span></font>
<p>---------------------------------------------------------------------<br>
Intel Israel (74) Limited</p>

<p>This e-mail and any attachments may contain confidential material for<br>
the sole use of the intended recipient(s). Any review or distribution<br>
by others is strictly prohibited. If you are not the intended<br>
recipient, please contact the sender and delete all copies.</p><br>_______________________________________________<br>LLVM Developers mailing list<br>llvm-dev@lists.llvm.org<br>http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev<br></blockquote><br><br><br>-- <br><div><span name="x"></span>Hal Finkel<br>Assistant Computational Scientist<br>Leadership Computing Facility<br>Argonne National Laboratory<span name="x"></span><br></div></div></body></html>