[PATCH] D27395: Fixed store operation for a vector of i1.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 4 11:19:28 PST 2016


craig.topper added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/TargetLowering.cpp:3298
   unsigned Stride = MemSclVT.getSizeInBits() / 8;
+  Stride = (Stride == 0) ? 1 : Stride; // Stride can't be less than 1 byte.
   EVT IdxVT = getVectorIdxTy(DAG.getDataLayout());
----------------
Should this just be

unsigned Stride = (MemSclVT.getSizeInBits() + 7) / 8;

So that it always rounds up to the next byte for any size that isn't divisible by 8?


Repository:
  rL LLVM

https://reviews.llvm.org/D27395





More information about the llvm-commits mailing list