[PATCH] D86697: [SVE][CodeGen] Fix TypeSize/ElementCount related warnings in sve-split-load.ll

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 27 14:26:17 PDT 2020


efriedma added inline comments.


================
Comment at: llvm/include/llvm/Support/TypeSize.h:229
 
+  bool isPowerOf2() const { return (MinSize & (MinSize - 1)) == 0; }
+
----------------
This name is possibly misleading; the runtime size might not be a power of two even if isPowerOf2() returns true.

In the one place you're using it, the type can't be a vector type, anyway.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:1663
+      MPI = MLD->getPointerInfo().getWithOffset(
+          LoMemVT.getStoreSize().getFixedSize());
 
----------------
I thought we added some form of pointer increment that took care of the MachinePointerInfo?  Or am I misremembering?

Semantically, this looks correct.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:9646
   EVT LoVT, HiVT;
-  if (VTNumElts > EnvNumElts) {
+  if (VTNumElts.Min > EnvNumElts.Min) {
     LoVT = EnvVT;
----------------
Should we add a comparison operator to ElementCount, like the one we have for TypeSize?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86697



More information about the llvm-commits mailing list