[PATCH] D139874: [AMDGPU] Lower VGPR to physical SGPR COPY to S_MOV_B32 if VGPR contains the compile time constant
Jon Chesterfield via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 12 14:32:34 PST 2022
JonChesterfield added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/SIFixSGPRCopies.cpp:856
+ if (IMMVal <= UINT32_MAX) {
+ Register TmpReg =
+ MRI->createVirtualRegister(&AMDGPU::SReg_32_XM0RegClass);
----------------
Not sure the signed comparison works here. INT64_MIN is smaller than UINT32_MAX. Checked getImm() and it does return a signed value, so I guess we either convert to unsigned then compare, or truncate to int32_t and check that is equal to the original
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139874/new/
https://reviews.llvm.org/D139874
More information about the llvm-commits
mailing list