[all-commits] [llvm/llvm-project] 1669fd: [Matrix] Use alignment info when lowering loads/st...

Florian Hahn via All-commits all-commits at lists.llvm.org
Thu Jun 18 05:30:00 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 1669fddc9f6096a5c674ba0a459403ea2c5ffd9c
      https://github.com/llvm/llvm-project/commit/1669fddc9f6096a5c674ba0a459403ea2c5ffd9c
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2020-06-18 (Thu, 18 Jun 2020)

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

  Log Message:
  -----------
  [Matrix] Use alignment info when lowering loads/stores.

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 size in bytes.

Reviewers: anemet, Gerolf, hfinkel, andrew.w.kaylor, LuoYuanke, rjmccall

Reviewed By: rjmccall

Differential Revision: https://reviews.llvm.org/D81960




More information about the All-commits mailing list