[all-commits] [llvm/llvm-project] 0766ae: [LegalizeTypes][RISCV][PowerPC] Expand CTLZ/CTTZ/C...
Craig Topper via All-commits
all-commits at lists.llvm.org
Fri Oct 22 09:10:50 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0766aef3f32d5d642d6436140b36689b1f2b5adf
https://github.com/llvm/llvm-project/commit/0766aef3f32d5d642d6436140b36689b1f2b5adf
Author: Craig Topper <craig.topper at sifive.com>
Date: 2021-10-22 (Fri, 22 Oct 2021)
Changed paths:
M llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
M llvm/test/CodeGen/PowerPC/popcnt-zext.ll
M llvm/test/CodeGen/RISCV/bswap-ctlz-cttz-ctpop.ll
M llvm/test/CodeGen/RISCV/rv64zbb.ll
Log Message:
-----------
[LegalizeTypes][RISCV][PowerPC] Expand CTLZ/CTTZ/CTPOP instead of promoting if they'll be expanded later.
Expanding these requires multiple constants. If we promote during type
legalization when they'll end up getting expanded in LegalizeDAG, we'll
use larger constants. These constants may be harder to materialize.
For example, 64-bit constants on 64-bit RISCV are very expensive.
This is similar to what has already been done to BSWAP and BITREVERSE.
Reviewed By: RKSimon
Differential Revision: https://reviews.llvm.org/D112268
More information about the All-commits
mailing list