<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"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature">~Craig</div></div>
<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/<wbr>GettingStarted.html#host-c-<wbr>toolchain-both-compiler-and-<wbr>standard-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="h5"><br>
<br>
2017-04-03 3:28 GMT+08:00 Craig Topper via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">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">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>