<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On May 15, 2015, at 7:09 PM, David Blaikie <<a href="mailto:dblaikie@gmail.com" class="">dblaikie@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><br class="Apple-interchange-newline"><br style="font-family: Helvetica; font-size: 10px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class="gmail_quote" style="font-family: Helvetica; font-size: 10px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">On Fri, May 15, 2015 at 8:15 AM, Adam Nemet<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:anemet@apple.com" target="_blank" class="">anemet@apple.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br class=""><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 style="word-wrap: break-word;" class=""><br class=""><div class=""><span class=""><blockquote type="cite" class=""><div class="">On Apr 2, 2015, at 8:16 PM, Adam Nemet <<a href="mailto:anemet@apple.com" target="_blank" class="">anemet@apple.com</a>> wrote:</div><br class=""><div class=""><div style="word-wrap: break-word;" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Apr 2, 2015, at 11:15 AM, David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank" class="">dblaikie@gmail.com</a>> wrote:</div><br class=""><div class=""><div dir="ltr" class=""><br class=""><div class="gmail_extra"><br class=""><div class="gmail_quote">On Thu, Apr 2, 2015 at 11:09 AM, Adam Nemet<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:anemet@apple.com" target="_blank" class="">anemet@apple.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br class=""><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 style="word-wrap: break-word;" class=""><br class=""><div class=""><span class=""><blockquote type="cite" class=""><div class="">On Apr 2, 2015, at 11:05 AM, David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank" class="">dblaikie@gmail.com</a>> wrote:</div><br class=""><div class=""><div dir="ltr" class="">Test case? Or is this just a perf improvement?</div></div></blockquote><div class=""><br class=""></div></span><div class="">No it’s a bug fix because without this check we will use the null MemoryRuntimeCheck later. </div><div class=""><br class=""></div><div class="">There should be a way to come up with a testcase even without Loop Distribution but it should be much easier with Loop Distribution.  Let me add a testcase for this as part of the LDist patch.  OK?</div></div></div></blockquote><div class=""><br class="">Sure - follow up here with the revision the test is committed in?<br class=""></div></div></div></div></div></blockquote><div class=""><br class=""></div><div class="">Sounds good, I have this thread marked already.</div></div></div></div></blockquote><div class=""><br class=""></div></span><div class="">The testcase that originally triggered this is now committed as test/Transforms/LoopDistribute/crash-in-memcheck-generation.ll.</div></div></div></blockquote><div class=""><br class="">Helpful to have the commit revision as well, for posterity. Looks like it's r237358<br class=""></div></div></div></blockquote><div><br class=""></div><div>Yep, sorry about that.</div><br class=""><blockquote type="cite" class=""><div class=""><div class="gmail_quote" style="font-family: Helvetica; font-size: 10px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div class=""><br class="">Thanks!<br class=""> </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 style="word-wrap: break-word;" class=""><div class=""><span class="HOEnZb"><font color="#888888" class=""><div class=""><br class=""></div><div class="">Adam</div></font></span><div class=""><div class="h5"><br class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word;" class=""><div class=""><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><div class=""> </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 style="word-wrap: break-word;" class=""><div class=""><span class=""><font color="#888888" class=""><div class=""><br class=""></div><div class="">Adam</div></font></span><div class=""><div class=""><br class=""><blockquote type="cite" class=""><div class=""><div class="gmail_extra"><div class="gmail_quote">On Thu, Apr 2, 2015 at 10:51 AM, Adam Nemet<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:anemet@apple.com" target="_blank" class="">anemet@apple.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br class=""><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;">Author: anemet<br class="">Date: Thu Apr  2 12:51:57 2015<br class="">New Revision: 233930<br class=""><br class="">URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project?rev=233930&view=rev" target="_blank" class="">http://llvm.org/viewvc/llvm-project?rev=233930&view=rev</a><br class="">Log:<br class="">[LoopAccesses] Handle case when no memchecks are needed after partitioning<br class=""><br class="">Modified:<br class="">   <span class="Apple-converted-space"> </span>llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp<br class=""><br class="">Modified: llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp<br class="">URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp?rev=233930&r1=233929&r2=233930&view=diff" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp?rev=233930&r1=233929&r2=233930&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp (original)<br class="">+++ llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp Thu Apr  2 12:51:57 2015<br class="">@@ -1211,9 +1211,8 @@ static Instruction *getFirstInst(Instruc<br class=""><br class=""> std::pair<Instruction *, Instruction *> LoopAccessInfo::addRuntimeCheck(<br class="">     Instruction *Loc, const SmallVectorImpl<int> *PtrPartition) const {<br class="">-  Instruction *tnullptr = nullptr;<br class="">   if (!PtrRtCheck.Need)<br class="">-    return std::pair<Instruction *, Instruction *>(tnullptr, tnullptr);<br class="">+    return std::make_pair(nullptr, nullptr);<br class=""><br class="">   unsigned NumPointers = PtrRtCheck.Pointers.size();<br class="">   SmallVector<TrackingVH<Value> , 2> Starts;<br class="">@@ -1284,6 +1283,9 @@ std::pair<Instruction *, Instruction *><br class="">     }<br class="">   }<br class=""><br class="">+  if (!MemoryRuntimeCheck)<br class="">+    return std::make_pair(nullptr, nullptr);<br class="">+<br class="">   // We have to do this trickery because the IRBuilder might fold the check to a<br class="">   // constant expression in which case there is no Instruction anchored in a<br class="">   // the block.<br class=""><br class=""><br class="">_______________________________________________<br class="">llvm-commits mailing list<br class=""><a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank" class="">llvm-commits@cs.uiuc.edu</a><br class=""><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank" class="">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a></blockquote></div></div></div></blockquote></div></div></div></div></blockquote></div></div></div></div></blockquote></div></div></div></blockquote></div></div></div></div></blockquote></div></div></blockquote></div><br class=""></body></html>