<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;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Sep 19, 2017, at 8:44 AM, Reid Kleckner <<a href="mailto:rnk@google.com" class="">rnk@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote">On Tue, Sep 19, 2017 at 8:40 AM, Adrian Prantl via llvm-dev <span dir="ltr" class=""><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank" class="">llvm-dev@lists.llvm.org</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">> Later loop unroll comes and unrolls the loop and then suddenly we have two absolutely identical dbg.declares and the assert in addFragmentOffset() blows. Who's at fault?<br class="">
<br class="">
</span>Without having read the code yet, my intuition says that the unroller should not be duplicating dbg.declares, only dbg.values.<br class=""></blockquote><div class=""><br class=""></div><div class="">I think it's a bug in both places: the backend should tolerate identical, duplicate dbg.declares,</div></div></div></div></div></blockquote><div><br class=""></div><div>I guess that's fair, yes.</div><div><br class=""></div><div>-- adrian</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><div class=""> and the loop unroller probably shouldn't duplicate dbg.declare, since there is no point.</div><div class=""><br class=""></div><div class="">IR is supposed to be duplicatable unless it is marked noduplicate. That was ultimately the fix we applied for PR33157, right?</div></div></div></div>
</div></blockquote></div><br class=""></body></html>