[PATCH] D111864: [AMDGPU] Avoid redundant calls to numBits in AMDGPUCodeGenPrepare::replaceMulWithMul24().

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 15 02:04:42 PDT 2021


foad added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp:512
+  } else if (ST->hasMulI24() &&
+             Size >= 24 && // Types less than 24-bit should be treated as u24.
+             (LHSBits = numBitsSigned(LHS, Size)) < 24 &&
----------------
I realize this check was already in isI24, but I don't see the point of it. I think the only effect it has is: on a machine that has mul_i24 but not mul_u24, we will fail to do this optimization, for no good reason.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111864



More information about the llvm-commits mailing list