[PATCH] D120648: [RISCV] DAG combine bswap(srl (bswap t), x) to shl t, x

Chenbing.Zheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 28 00:57:30 PST 2022


Chenbing.Zheng created this revision.
Chenbing.Zheng added reviewers: craig.topper, frasercrmck, asb, luismarques, benshi001.
Chenbing.Zheng added a project: LLVM.
Herald added subscribers: VincentWu, luke957, achieveartificialintelligence, vkmr, evandro, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, hiraditya.
Chenbing.Zheng requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead, eopXD, jacquesguan, MaskRay.

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D120648

Files:
  llvm/lib/Target/RISCV/RISCVISelLowering.cpp
  llvm/test/CodeGen/RISCV/bswap-bitreverse.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120648.411749.patch
Type: text/x-patch
Size: 3283 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220228/e6705bf2/attachment.bin>


More information about the llvm-commits mailing list