[llvm] [AMDGPU][GlobalISel] Allow forming s16 U/SBFX pre-regbankselect (PR #131309)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue May 13 03:12:30 PDT 2025


arsenm wrote:

> I feel like having BFX work on many types is useful, even if codegen ends up generating it with ext/truncs. Matching all the possible shift/and combinations for bitfield extracts can get repetitive

I don't think this is a good motivation. We shouldn't be artificially making operations legal. It's hiding the true cost of the operation. We should pick a preferred form in terms of legal operations 


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


More information about the llvm-commits mailing list