[PATCH] D81960: [Matrix] Use alignment info when lowering loads/stores.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 17 02:07:31 PDT 2020


fhahn marked 2 inline comments as done.
fhahn added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp:785
+    }
+    return commonAlignment(InitialAlign, ElementAlign);
+  }
----------------
rjmccall wrote:
> This should be `commonAlignment(InitialAlign, ElementSize / 8)`.  If you have an array of 8-byte objects, and the start is 8-byte-aligned, all the elements are 8-byte-aligned regardless of the natural alignment of the type.
> 
> Also, the right default assumption should always be that the DataLayout's built-in concept of type alignment is bad and wrong.  Once there's an explicit alignment given in the IR, there is no reason that the DataLayout alignment should ever play a role in the calculation.
Done, thanks!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81960





More information about the llvm-commits mailing list