<div dir="ltr">/looks/ necessary to me. As one of the replies said: "The event_t member of queue_ptr could point at the same memory as event_ptr."<br><br>This means that this line "queue_ptr->queue[queue_ptr->wr_idx++] = *event_ptr;" invalidates all the loads through queue_ptr before it, and they have to be loaded again after this (because queue_ptr->queue might point into the same memory that queue_ptr points into, so the assignment might've modified the things queue_ptr points to)</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">‪On Thu, Oct 24, 2019 at 11:23 AM ‫אלכס לופ' via llvm-dev‬‎ <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:‬<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="rtl"><div dir="ltr" align="left">Hi,</div>
<div dir="ltr" align="left"> </div>
<div dir="ltr" align="left">Sorry for disturbind all of you through this mailing list.</div>
<div dir="ltr" align="left">I am looking for a way to report an optimization issue which I inspected when compiled a C code with clang using -Oz optimization option (-O2/3 also reproduces it).</div>
<div dir="ltr" align="left">I posted this to SO (<a href="https://stackoverflow.com/questions/58407841/does-clang-misunderstand-the-const-pointer-specifier" target="_blank">https://stackoverflow.com/questions/58407841/does-clang-misunderstand-the-const-pointer-specifier</a>) but still got no satisfying answer.</div>
<div dir="ltr" align="left"> </div>
<div dir="ltr" align="left">Thank you for your help,</div>
<div dir="ltr" align="left">Alex.</div></div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>