[PATCH] D140208: [AMDGPU] Improved wide multiplies

Thomas Symalla via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 10 04:32:49 PST 2023


tsymalla added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp:2927
+  }
+  for (unsigned i = 0; i < Src1.size(); ++i) {
+    Src1KnownZeros.push_back(KB.getKnownBits(Src1[i]).isZero());
----------------
Can use ranged for-loops


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp:3040
             unsigned j1 = DstIndex - j0;
+            if (Src0KnownZeros[j0] || Src1KnownZeros[j1]) {
+              ++j0;
----------------
Can one of these accesses be out-of-bounds now that you removed the assumption that both Src0 and Src1 are of equal length?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140208



More information about the llvm-commits mailing list