[PATCH] D139874: [AMDGPU] Lower VGPR to physical SGPR COPY to S_MOV_B32 if VGPR contains the compile time constant
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 12 15:11:02 PST 2022
arsenm added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/SIFixSGPRCopies.cpp:861
+ .addImm(IMMVal);
+ MI.getOperand(1).setReg(TmpReg);
+ }
----------------
First of all, you should be just doing addOperand and forwarding whatever was there originally. No need to muck about with conversions or immediates
The 64-bit case is not solved by simply truncating the immediate. It's materializing a 64-bit value. I'd think you'd be hard pressed to write a a testcase without using MIR (which probably should be done)
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