<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Aug 15, 2013, at 11:24 , Chandler Carruth <<a href="mailto:chandlerc@google.com">chandlerc@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 8, 2013 at 11:04 PM, Matt Arsenault <span dir="ltr"><<a href="mailto:arsenm2@gmail.com" target="_blank" class="cremed">arsenm2@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 class="im">On Aug 8, 2013, at 0:36 , Chandler Carruth <<a href="mailto:chandlerc@gmail.com" class="cremed">chandlerc@gmail.com</a>> wrote:<br>

<br>
>  I don't think this is the correct fix. Your original message indicates there something wrong with tracking a base and offset through an integer that happens to be wider than necessary for the pointer value?<br>

</div>It's more that it's different and not that it's bigger. stripAndComputeInBoundsConstantOffsets returns a constant integer that is the pointer size, and is kept in the ConstantOffsetPtrs. In the test case, when the sub is visited, it uses those 32-bit constants for constant simplified value. This simplified value is then 32 bits which is inconsistent with its uses. When the simplified value is used when visiting the icmp, it isn't the same type as the i64 other operand.</blockquote>
</div><br>So, somewhere in the original code, there is a 32-bit -> 64-bit extension (ptrtoint, or zext, or sext, or ?) that feeds into the icmp. At that point, we should extend the constant and should use the extended constant when visiting the icmp.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">Again, I can't give more detailed help w/o a test case.</div></div>
</blockquote></div>The test case is the one I added, the ptrtoint_larger one</body></html>