[llvm] [AMDGPU] Add post-RA peephole to fuse v_lshlrev_b32 + v_or_b32 into v_lshl_or_b32 (PR #202585)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 9 06:16:25 PDT 2026


jayfoad wrote:

> > > On GFX10+ the constant bus limit allows for 2 of the 3 inputs to be SGPRs, which seems pretty generous. So does this patch give any benefit on GFX10+ or is it really only helpful for GFX9 and earlier?
> 
> Yes, it helps on GFX10+. You can see it directly in the test diffs: in fptoui-sat-vector.ll the new v_lshl_or_b32 lines land under the GFX11 and GFX12 check prefixes, for example.

I see. This is the unfortunate case where we have uniform values in VGPRs, because the use of f16 forces us to use VALU instructions (at least on GFX11; on GFX12 we ought to be able to use SALU float instructions instead).

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


More information about the llvm-commits mailing list