[llvm] [AMDGPU] Do not use 64-bit literals with VOP3* encodings (PR #156602)
Stanislav Mekhanoshin via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 4 01:46:59 PDT 2025
rampitec wrote:
> > Is it true that handling for the 64bit literals is already correct in codegen, so this patch would not change emitted code?
>
> The patch _could_ change emitted code if codegen created anything like:
>
> ```
> $vgpr0_vgpr1, $sgpr0 = V_MAD_U64_U32_e64 $vgpr0, $vgpr0, 0x80000000, 0, implicit $exec
> ```
>
> Currently I don't think codegen does this, but only because SIFoldOperands is conservative about when it folds 64-bit constants into their uses. If codegen _did_ generate something like this then I would not consider it a bug in codegen.
This seems like a situation when folding could have happened, but was gated by the conservative condition `Desc.getSize() != 4`.
https://github.com/llvm/llvm-project/pull/156602
More information about the llvm-commits
mailing list