<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Josh,<div class=""><br class=""></div><div class="">That sounds like a bug, but I don’t have enough information to know what is going on.</div><div class=""><br class=""></div><div class="">Could you file a public report in buzgilla and attach the IR (run clang with `-emit-llvm`) and the debug output of the coalescer (-mllvm -debug-only=regalloc)?</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">-Quentin<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Apr 11, 2019, at 9:32 PM, Josh Sharp via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><div id="divRplyFwdMsg" dir="ltr" class=""><div class=""> </div></div><div class=""><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;" class="">Hi all,</div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;" class="">I have an error I do not understand. My program crashes during the 'Simple Register Coalescing' pass. All I know is that the crash happens inside LiveRange::Query() in llvm/include/llvm/CodeGen/LiveInterval.h and is due to the fact that EarlyVal is null and causes a crash when evaluating<span class="Apple-converted-space"> </span><span class="">if (EarlyVal->def == Idx.getBaseIndex()).<span class="Apple-converted-space"> </span><span style="font-family: Calibri, Helvetica, sans-serif;" class="">What could be the reason why EarlyVal is null?</span></span><span style="font-family: Calibri, Helvetica, sans-serif;" class=""><span class="Apple-converted-space"> </span></span><span class="">The function on which the pass is being run is:</span></div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;" class=""><span class=""><br class=""></span></div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;" class=""><span class=""><br class=""></span></div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;" class=""><span class=""></span><span class=""></span><br class=""></div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;" class=""><span style="font-family: "Courier New", monospace;" class="">void foo(uint8_t* input, const uint8_t* key, uint8_t *output, size_t len)</span><span class=""><br class=""></span><div class=""><span style="font-family: "Courier New", monospace;" class="">{</span><br class=""></div><br class=""><blockquote style="margin-top: 0px; margin-bottom: 0px;" class=""><blockquote style="margin-top: 0px; margin-bottom: 0px;" class=""><div class=""><span style="font-family: "Courier New", monospace;" class="">uint16_t np1 = (len * 8)/64;</span><br class=""></div><div class=""><span style="font-family: "Courier New", monospace;" class="">uint16_t n = np1 - 1;</span><br class=""></div><div class=""><span style="font-family: "Courier New", monospace;" class="">uint64_t A;</span><br class=""></div><div class=""><span style="font-family: "Courier New", monospace;" class="">uint64_t R[n+1];</span><br class=""></div><div class=""><span style="font-family: "Courier New", monospace;" class="">int i,j;</span><br class=""></div></blockquote></blockquote><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><span style="font-family: "Courier New", monospace;" class="">       memcpy(&A,input,8);</span><br class=""></div><div class=""><span style="font-family: "Courier New", monospace;" class="">       for (i = 1; i<= n;i++)</span><br class=""></div><div class=""><span style="font-family: "Courier New", monospace;" class="">       {</span><br class=""></div><div class=""><span style="font-family: "Courier New", monospace;" class="">           memcpy(&R[i], input + 8*i,8);</span><br class=""></div><div class=""><span style="font-family: "Courier New", monospace;" class="">       }</span><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><span style="font-family: "Courier New", monospace;" class="">       for (j = 5; j >= 0; j--)</span><br class=""></div><div class=""><span style="font-family: "Courier New", monospace;" class="">           for (i = n; i >= 1; i--)</span><br class=""></div><div class=""><span style="font-family: "Courier New", monospace;" class="">           {</span><br class=""></div><div class=""><span style="font-family: "Courier New", monospace;" class="">            uint64_t l_input[2] =</span><br class=""></div><div class=""><span style="font-family: "Courier New", monospace;" class="">            {</span><br class=""></div><div class=""><span style="font-family: "Courier New", monospace;" class="">              A ^ (((uint64_t)(n*j+i))<<56),</span><br class=""></div><div class=""><span style="font-family: "Courier New", monospace;" class="">              R[i]</span><br class=""></div><div class=""><span style="font-family: "Courier New", monospace;" class="">            };</span><br class=""></div><br class=""><div class=""><span style="font-family: "Courier New", monospace;" class="">               dec((uint8_t*)l_input, key, output);</span><br class=""></div><div class=""><span style="font-family: "Courier New", monospace;" class="">               memcpy(&A,output,8);</span><br class=""></div><div class=""><span style="font-family: "Courier New", monospace;" class="">               memcpy(&R[i],output+8,8);</span><br class=""></div><div class=""><span style="font-family: "Courier New", monospace;" class="">           }</span><br class=""></div><br class=""><div class=""><span style="font-family: "Courier New", monospace;" class="">       memcpy(output,&A,8);</span><br class=""></div><div class=""><span style="font-family: "Courier New", monospace;" class="">       int k;</span><br class=""></div><div class=""><span style="font-family: "Courier New", monospace;" class="">       for(k=1;k<(n+1);k++)</span><br class=""></div><div class=""><span style="font-family: "Courier New", monospace;" class="">       {</span><br class=""></div><div class=""><span style="font-family: "Courier New", monospace;" class="">        memcpy(output+8*k,&R[k],8);</span><br class=""></div><div class=""><span style="font-family: "Courier New", monospace;" class="">       }</span><br class=""></div><span style="font-family: "Courier New", monospace;" class="">}</span></div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;" class=""><span style="font-family: "Courier New", monospace;" class=""><br class=""></span></div><div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;" class="">Thanks.<br class=""></div></div></div><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">_______________________________________________</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">LLVM Developers mailing list</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><a href="mailto:llvm-dev@lists.llvm.org" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">llvm-dev@lists.llvm.org</a><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a></div></blockquote></div><br class=""></div></body></html>