[llvm] r255334 - [InstCombine] Make MatchBSwap also match bit reversals

James Molloy via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 24 14:36:16 PST 2015


Huh.

I'm not sure I understand the test case I'm afraid- that's only 32
operations to look through ... What am I missing?

Cheers,

James
On Thu, 24 Dec 2015 at 21:31, Joerg Sonnenberger via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> On Fri, Dec 11, 2015 at 10:04:51AM -0000, James Molloy via llvm-commits
> wrote:
> > Author: jamesm
> > Date: Fri Dec 11 04:04:51 2015
> > New Revision: 255334
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=255334&view=rev
> > Log:
> > [InstCombine] Make MatchBSwap also match bit reversals
>
> While I like the idea here, the implementation is not reasonable.
>
> Consider the following input:
>
> unsigned b;
> fn1() {
>   int i;
>   for (i = 0; i < LIMIT; ++i)
>     b |= b >> 1;
> }
>
> Debug+assert builds start to show the exponential runtime for LIMIT
> around 10, release builds after 18 or so. Intercal effectively used 32
> and hit the CPU fans :)
>
> Joerg
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151224/b4ffc5e7/attachment.html>


More information about the llvm-commits mailing list