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

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 16 12:40:01 PDT 2020


fhahn created this revision.
fhahn added reviewers: anemet, Gerolf, hfinkel, andrew.w.kaylor, LuoYuanke, rjmccall.
Herald added subscribers: tschuett, hiraditya.
Herald added a project: LLVM.

This patch updates LowerMatrixIntrinsics to preserve the alignment
specified at the original load/stores and the align attribute for the
pointer argument of the column.major.load/store intrinsics.

We can always use the specified alignment for the load of the first
column. For subsequent columns, the alignment may need to be reduced.

For ConstantInt strides, compute the offset for the start of the column in
bytes and use commonAlignment to get the largest valid alignment.

For non-ConstantInt strides, we need to take the common alignment of the
initial alignment and the element alignment.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D81960

Files:
  llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp
  llvm/test/Transforms/LowerMatrixIntrinsics/const-gep.ll
  llvm/test/Transforms/LowerMatrixIntrinsics/load-align-volatile.ll
  llvm/test/Transforms/LowerMatrixIntrinsics/store-align-volatile.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81960.271169.patch
Type: text/x-patch
Size: 20830 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200616/fdd41e1e/attachment.bin>


More information about the llvm-commits mailing list