<div dir="ltr">Sorry, I'm not sure I'll be able to help you - main.c uses other code (optsfind/check/etc) that I don't have/don't know what that code is, and even with it it's probably a bit big/complicated for me to debug/reduce/etc. If you can reconstruct the smallest complete (reducing the total lines of all source/header files needed to reproduce the problem) example that might be more practical to discuss here & see whether it's a mem2reg bug, etc.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 13, 2020 at 6:52 PM <a href="mailto:liubaosen@tsinghua.edu.cn">liubaosen@tsinghua.edu.cn</a> <<a href="mailto:liubaosen@tsinghua.edu.cn">liubaosen@tsinghua.edu.cn</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>
<div><span></span>Hi, David and anyone relevent,</div><div><br></div><div>Thank you for replying, first.</div><div>I tried it with valgrind, no error is reported, so I'm sure it's not our problem.</div><div>The valgrind log is affixed and a mian.c which you may need to generate an executable is also affixed.</div><div>Please do me a favor and investigate what causes the colapse. Your help will be greatly appreciated.</div><div><br></div><div>Best regards</div>
<div><br></div><hr style="width:210px;height:1px" color="#b5c4df" size="1" align="left">
<div><span><div style="margin:10px;font-family:verdana;font-size:10pt"><div><a href="mailto:liubaosen@tsinghua.edu.cn" target="_blank">liubaosen@tsinghua.edu.cn</a></div></div></span></div>
<blockquote style="margin-top:0px;margin-bottom:0px;margin-left:0.5em;margin-right:inherit"><div> </div><div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(181,196,223);padding:3pt 0cm 0cm"><div style="padding:8px;font-size:12px;font-family:tahoma;color:rgb(0,0,0);background:rgb(239,239,239)"><div><b>From:</b> <a href="mailto:dblaikie@gmail.com" target="_blank">David Blaikie</a></div><div><b>Date:</b> 2020-05-12 11:45</div><div><b>To:</b> <a href="mailto:liubaosen@tsinghua.edu.cn" target="_blank">liubaosen@tsinghua.edu.cn</a></div><div><b>CC:</b> <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev</a></div><div><b>Subject:</b> Re: [llvm-dev] bug report on mem2reg</div></div></div><div><div class="gmail-m_3012178238456374524FoxDiv20200514093625322556"><div dir="ltr">Tried testing it with things like Undefined Behaivor Sanitizer (or other sanitizers - memory/address) or valgrind?<br><br>Often "program works sometimes and doesn't work other times" is because the program has undefined behavior in it & the times its working are just luck.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, May 11, 2020 at 8:41 PM <a href="mailto:liubaosen@tsinghua.edu.cn" target="_blank">liubaosen@tsinghua.edu.cn</a> via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">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>
<div><span></span>Hi, all,</div><div><br></div><div>I think I found a bug on mem2reg in a particular case.</div><div>When I ran opt -mem2reg -basicaa -scalar-evolution -loops -da -analyze opts.ll, it collapsed. While without mem2reg option, it runs well. so I guess it has something to do with mem2reg.</div><div>The relative files have been affixed, please check them for me.</div><div>Thanks in advance.</div>
<div><br></div><hr style="width:210px;height:1px" color="#b5c4df" size="1" align="left">
<div><span><div style="margin:10px;font-family:verdana;font-size:10pt"><div><a href="mailto:liubaosen@tsinghua.edu.cn" target="_blank">liubaosen@tsinghua.edu.cn</a></div></div></span></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>
</div></div></blockquote>
</div></blockquote></div>