<div dir="ltr">Assuming I understand you correctly - no, that's the mistake I made in the original version of this patch. :-)<div>See discussion with Philip on <a href="https://reviews.llvm.org/D28147">https://reviews.llvm.org/D28147</a> .</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 18, 2017 at 2:16 PM, Xin Tong via Phabricator <span dir="ltr"><<a href="mailto:reviews@reviews.llvm.org" target="_blank">reviews@reviews.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">trentxintong added inline comments.<br>
<br>
<br>
================<br>
</span>Comment at: llvm/trunk/lib/Transforms/<wbr>Scalar/LICM.cpp:1037<br>
<span class="">     SafeToInsertStore =<br>
-        isAllocLikeFn(Object, TLI) && !PointerMayBeCaptured(Object, true, true);<br>
+        (isAllocLikeFn(Object, TLI) || isa<AllocaInst>(Object)) &&<br>
+        !PointerMayBeCaptured(Object, true, true);<br>
</span>----------------<br>
The question I really want to ask is whether the check for MayNotBeCaptured is necessary for Alloca. Should not alloca be implicitly thread local ? The language reference does not explicitly state it.<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
Repository:<br>
  rL LLVM<br>
<br>
<a href="https://reviews.llvm.org/D28170" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D28170</a><br>
<br>
<br>
<br>
</div></div></blockquote></div><br></div>