[PATCH] D118012: [DAGCombiner][RISCV] Canonicalize (bswap(bitreverse(x))->bitreverse(bswap(x)).
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 24 02:13:42 PST 2022
RKSimon accepted this revision.
RKSimon added a comment.
This revision is now accepted and ready to land.
LGTM - cheers
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:9380
+ // Canonicalize bswap(bitreverse(x)) -> bitreverse(bswap(x)). This helps
+ // when bitreverse gets expanded.
+ if (N0.getOpcode() == ISD::BITREVERSE && N0.hasOneUse()) {
----------------
Maybe mention its because expandBITREVERSE tries to perform a bswap first?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118012/new/
https://reviews.llvm.org/D118012
More information about the llvm-commits
mailing list