[PATCH] D112395: [AMDGPU] Enable 48-bit mul in AMDGPUCodeGenPrepare.

Abinav Puthan Purayil via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 26 05:07:48 PDT 2021


abinavpp marked 5 inline comments as done.
abinavpp added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp:534
 
   if (ST->hasMulU24() && (LHSBits = numBitsUnsigned(LHS, Size)) <= 24 &&
       (RHSBits = numBitsUnsigned(RHS, Size)) <= 24) {
----------------
foad wrote:
> Do all subtargets that have mul_u24 also have mulhi_u24, and the same for i24?
I guess so. We're doing the same thing in AMDGPUISelLowering.cpp. For amdgcn, I can see a corresponding 24-bit mulhi instruction for GFX6 and above. For r600, I can see that in HD6900 and Evergreen. I haven't looked at all the subtargets. The subtarget initialization should take care of this.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112395



More information about the llvm-commits mailing list