[PATCH] D96681: [RISCV][LegalizeTypes] Try to expand BITREVERSE before promoting if the promoted BITREVERSE would expand anyway.

Kazushi Marukawa via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 29 05:19:53 PDT 2021


kaz7 added a comment.

Is it possible to disable this expansion on a architecture which has 64 bit bitreverse and want to promote 32 bit bitreverse to 64 bit?

VE expected promotion which generateed 2 instructions for 32 bit bitreverse previously.  But now,  bitreverse is expanded with bswap which generates 27 isntructions.

I tried to fix it by VE implementation like trying to add isel patterns, but it doesn't work well.  If there is some kind option to avoid bswap expansion, please let me know.  Thanks!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96681/new/

https://reviews.llvm.org/D96681



More information about the llvm-commits mailing list