<div dir="ltr">Were you able to determine if it was a compiler bug? (an isolated example would help to make that clear - it's hard to know from the workaround whether that suppressed a legitimate compiler optimization that was tickling some bug in the code or working around a bug in the compiler)</div><br><div class="gmail_quote"><div dir="ltr">On Sun, Jul 1, 2018 at 8:07 AM Jeffrey Walton via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Sat, Jun 30, 2018 at 3:49 AM, Jeffrey Walton <<a href="mailto:noloader@gmail.com" target="_blank">noloader@gmail.com</a>> wrote:<br>
> Hi Everyone,<br>
><br>
> We caught a report for a failed self test when using Clang 5.0 and 6.0<br>
> with -DDEBUG and -O1 (i.e., a "debug build"). The code is question is<br>
> located at <a href="https://github.com/weidai11/cryptopp/blob/master/cham-simd.cpp" rel="noreferrer" target="_blank">https://github.com/weidai11/cryptopp/blob/master/cham-simd.cpp</a><br>
> . It is the SSSE3 code path for CHAM64.<br>
><br>
> ...<br>
<br>
We cleared the issue at<br>
<a href="https://github.com/weidai11/cryptopp/commit/aa80c7d4acb6" rel="noreferrer" target="_blank">https://github.com/weidai11/cryptopp/commit/aa80c7d4acb6</a> . We did not<br>
have a methodology. We teased-out the solution through knob turning.<br>
<br>
The aa80c7d4acb6 change modifies a loop to perform 4<br>
encryption/decryption rounds per iteration rather than 8. 8 rounds per<br>
iteration decryption was bad. Dropping from 8 to 4 relieved some<br>
register pressure by requiring 4 fewer loads of a mask used to shuffle<br>
a key.<br>
<br>
Thanks for the help and suggestions.<br>
<br>
Jeff<br>
_______________________________________________<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/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>