This is an archive of the discontinued LLVM Phabricator instance.

[DAGCombine] fold (bitreverse(srl (bitreverse c), x)) -> (shl c, x)
AbandonedPublic

Authored by Chenbing.Zheng on Mar 11 2022, 1:00 AM.

Details

Summary

Combine
t2 = bitreverse t1; t3 = srl t2, x; bitreverse t3 to shl t1, x.

This is similar to D120648, and there is no limit to x %8 == 0
because of bitreverse is deal with one bit.

Diff Detail