[PATCH] D84249: AMDGPU/GlobalISel: Stop using G_EXTRACT in argument lowering

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 6 01:40:50 PDT 2020


foad accepted this revision.
foad added a comment.

Looks OK to me too modulo comments inline.



================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp:372
   if (SrcTy.isVector() && !PartTy.isVector() &&
       PartSize > SrcTy.getElementType().getSizeInBits()) {
     // Vector was scalarized, and the elements extended.
----------------
SrcTy.getScalarSizeInBits() ?


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp:382-383
+  if (GCDTy == PartTy) {
+    // If this already evenly divisible, we can create a simple merge or
+    // concat_vectors.
     B.buildUnmerge(DstRegs, SrcReg);
----------------
Comment seems wrong and possibly redundant.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp:389
+  MachineRegisterInfo &MRI = *B.getMRI();
+  LLT DstTy = MRI.getType(DstRegs[0]);
+  LLT LCMTy = getLCMType(SrcTy, PartTy);
----------------
Is DstTy ever different from PartTy? If so, what exactly is PartTy?


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

https://reviews.llvm.org/D84249



More information about the llvm-commits mailing list