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

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

Ah yes, looking at the IR output makes it clearer. There are ORs on each
side of the expression all the way down.

The algorithm has been in tree for years... We could surely modify this
patch to make it look more like a byte swap and trigger it in years old
versions of LLVM! :/

I'll create a patch but it'll be after these few days of Christmas :)

I hope intercal can survive in the meantime? ;)
On Thu, 24 Dec 2015 at 22:53, Joerg Sonnenberger <joerg at britannica.bec.de>

> On Thu, Dec 24, 2015 at 10:36:16PM +0000, James Molloy wrote:
> > I'm not sure I understand the test case I'm afraid- that's only 32
> > operations to look through ... What am I missing?
> I think the combination of "or" and "shift" forces the deep recursion.
> Note that this is a common avalanche pattern for ctz. I'm bit a
> surprised we haven't hit it earlier.
> Joerg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151224/fdb24e20/attachment.html>

More information about the llvm-commits mailing list