<div dir="ltr"><div class="gmail_default"><font face="arial, helvetica, sans-serif">Then I prefer removing to </font><span style="font-size:14px">entirely. It's weird to write single/multi word self move protection to workaround a bug of the host compiler whose version we don't support. Note on [1], it says:</span></div><div class="gmail_default"><span style="font-size:14px"><br></span></div><div class="gmail_default"><span style="font-size:14px"> For the most popular host toolchains we check for specific minimum versions in our build systems</span></div><div class="gmail_default"><span style="font-size:14px"><br></span></div><div class="gmail_default"><span style="font-size:14px">I don't play LLVM on Windows. But if the build system does check the minimum version, I think we should remove</span></div><div class="gmail_default"><span style="font-size:14px">the protection entirely.</span></div><div class="gmail_default"><span style="font-size:14px"><br></span></div><div class="gmail_default"><span style="font-size:14px">[1] <a href="http://llvm.org/docs/GettingStarted.html#host-c-toolchain-both-compiler-and-standard-library">http://llvm.org/docs/GettingStarted.html#host-c-toolchain-both-compiler-and-standard-library</a></span></div><div class="gmail_default"><span style="font-size:14px"><br></span></div><div class="gmail_default"><span style="font-size:14px">Regards,</span></div><div class="gmail_default"><span style="font-size:14px">chenwj</span></div><div class="gmail_default"><span style="font-size:14px"><br></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-04-04 5:35 GMT+08:00 Craig Topper <span dir="ltr"><<a href="mailto:craig.topper@gmail.com" target="_blank">craig.topper@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">The way the code is currently written we only do the self-move check on the multiword case. But on if we do a self move on a single word, we'll end up calling a memcpy with src and dest the same which is UB. So either way this code needs to change. We need to either move it up to cover single word too or remove it entirely.</div><div class="gmail_extra"><span class="HOEnZb"><font color="#888888"><br clear="all"><div><div class="m_-193426660129840495gmail_signature" data-smartmail="gmail_signature">~Craig</div></div></font></span><div><div class="h5">
<br><div class="gmail_quote">On Sun, Apr 2, 2017 at 3:10 PM, 陳韋任 <span dir="ltr"><<a href="mailto:chenwj.cs97g@g2.nctu.edu.tw" target="_blank">chenwj.cs97g@g2.nctu.edu.tw</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I think so. Besides, recommended VS version is VS 2015 [1], the bug<br>
should be long gone.<br>
<br>
[1] <a href="http://llvm.org/docs/GettingStarted.html#host-c-toolchain-both-compiler-and-standard-library" rel="noreferrer" target="_blank">http://llvm.org/docs/GettingSt<wbr>arted.html#host-c-toolchain-<wbr>both-compiler-and-standard-<wbr>library</a><br>
<br>
Regards,<br>
chenwj<br>
<br>
<br>
--<br>
Wei-Ren Chen (陳韋任)<br>
Homepage: <a href="https://people.cs.nctu.edu.tw/~chenwj" rel="noreferrer" target="_blank">https://people.cs.nctu.edu.tw/<wbr>~chenwj</a><br>
<div><div class="m_-193426660129840495h5"><br>
<br>
2017-04-03 3:28 GMT+08:00 Craig Topper via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>>:<br>
> The comment says it was added due to a bug in MSVC 2013 implementation of<br>
> stable_sort. Newer versions of MSVC have fixed this bug in stable_sort<br>
> according to this webpage record<br>
> <a href="https://connect.microsoft.com/VisualStudio/feedback/details/886652" rel="noreferrer" target="_blank">https://connect.microsoft.com/<wbr>VisualStudio/feedback/details/<wbr>886652</a><br>
><br>
> Can we remove the check now?<br>
><br>
> ~Craig<br>
><br>
</div></div>> ______________________________<wbr>_________________<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="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
><br>
</blockquote></div><br></div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><br>--<br>Wei-Ren Chen (陳韋任)<br>Homepage: <a href="https://people.cs.nctu.edu.tw/~chenwj" target="_blank">https://people.cs.nctu.edu.tw/~chenwj</a></div>
</div>