[PATCH] D128252: [AMDGPU] VGPR to SGPR copies lowering

Alexander via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 13 08:27:55 PDT 2022


alex-t added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIFixSGPRCopies.cpp:1134
+      else
+        MIB.addReg(SrcReg);
+    } else {
----------------
rampitec wrote:
> What happens to 16 bit subregs?
VGPR to SGPR copies are inserted by InstrEmitter to adjust the VALU result to the SALU consumer.
The 16bits in VGPR result are packed and adjusted to the consumer by inserting the EXCTRACT_ELEMENT lowered in another place.
What kind of adjustment would you recommend if we have a 16bit VGPR source?
Zero-extend it to 32bit?



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128252/new/

https://reviews.llvm.org/D128252



More information about the llvm-commits mailing list