[llvm-dev] Determine reason for failure at -O1

David Blaikie via llvm-dev llvm-dev at lists.llvm.org
Sun Jul 1 20:14:42 PDT 2018


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)

On Sun, Jul 1, 2018 at 8:07 AM Jeffrey Walton via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> On Sat, Jun 30, 2018 at 3:49 AM, Jeffrey Walton <noloader at gmail.com>
> wrote:
> > Hi Everyone,
> >
> > We caught a report for a failed self test when using Clang 5.0 and 6.0
> > with -DDEBUG and -O1 (i.e., a "debug build"). The code is question is
> > located at
> https://github.com/weidai11/cryptopp/blob/master/cham-simd.cpp
> > . It is the SSSE3 code path for CHAM64.
> >
> > ...
>
> We cleared the issue at
> https://github.com/weidai11/cryptopp/commit/aa80c7d4acb6 . We did not
> have a methodology. We teased-out the solution through knob turning.
>
> The aa80c7d4acb6 change modifies a loop to perform 4
> encryption/decryption rounds per iteration rather than 8. 8 rounds per
> iteration decryption was bad. Dropping from 8 to 4 relieved some
> register pressure by requiring 4 fewer loads of a mask used to shuffle
> a key.
>
> Thanks for the help and suggestions.
>
> Jeff
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180701/7ebe6d88/attachment.html>


More information about the llvm-dev mailing list