[llvm] [RISCV] Use bset+addi for (not (sll -1, X)). (PR #72549)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 16 10:45:36 PST 2023


dtcxzyw wrote:

> `BSET` is expensive on both SiFive-7 (Latency = 3) and XiangShan-NanHu (Latency = 3).

SiFive: 
https://github.com/llvm/llvm-project/blob/186db1bcb0096a6af348d7e17866c68fa2004068/llvm/lib/Target/RISCV/RISCVSchedSiFive7.td#L295-L303

XiangShan-NanHu:
https://github.com/llvm/llvm-project/blob/b5a1feb9a374bd395795b26abd15ed9840a64339/llvm/lib/Target/RISCV/RISCVSchedXiangShanNanHu.td#L96-L116

https://github.com/llvm/llvm-project/pull/72549


More information about the llvm-commits mailing list