[PATCH] D100430: [AMDGPU][GlobalISel] Widen 1 and 2 byte scalar loads

Vang Thao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 4 11:24:14 PDT 2021


vangthao added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp:1180-1182
+        auto WideLoad = B.buildLoadFromOffset(S32, PtrReg, *MMO, 0);
+        auto Mask = B.buildConstant(
+            S32, APInt::getLowBitsSet(S32.getScalarSizeInBits(), MemSize));
----------------
arsenm wrote:
> MachineIRBuilder has a buildZExtInReg helper to figure out the mask and create the and for you
I used this previously but there was an issue with the implementation in buildZExtInReg where it would create a new destination register instead of using the original destination register passed to it. Jay mentioned this bug in a previous comment.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100430



More information about the llvm-commits mailing list