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.
Paths
| Differential D121448
[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 This is similar to D120648, and there is no limit to x %8 == 0
Diff Detail Event TimelineHerald added subscribers: llvm-commits, • pcwang-thead, jacquesguan, MaskRay. · View Herald TranscriptMar 11 2022, 1:00 AM
Revision Contents
Diff 414809 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/RISCV/bitreverse-srli-bitreverse.ll
llvm/test/CodeGen/X86/combine-bitreverse.ll
|