[all-commits] [llvm/llvm-project] a1ef81: [Matrix] Overload stride arg in matrix.columnwise....

Florian Hahn via All-commits all-commits at lists.llvm.org
Thu Aug 12 03:07:39 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a1ef81de35a4bac6d3b22e9d7186d880124d7a55
      https://github.com/llvm/llvm-project/commit/a1ef81de35a4bac6d3b22e9d7186d880124d7a55
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2021-08-12 (Thu, 12 Aug 2021)

  Changed paths:
    M clang/test/CodeGen/matrix-type-builtins.c
    M clang/test/CodeGenCXX/matrix-type-builtins.cpp
    M clang/test/CodeGenObjC/matrix-type-builtins.m
    M llvm/docs/LangRef.rst
    M llvm/include/llvm/IR/Intrinsics.td
    M llvm/include/llvm/IR/MatrixBuilder.h
    M llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp
    M llvm/test/Transforms/LowerMatrixIntrinsics/strided-load-double.ll
    M llvm/test/Transforms/LowerMatrixIntrinsics/strided-store-double.ll
    M llvm/test/Verifier/matrix-intrinsics.ll

  Log Message:
  -----------
  [Matrix] Overload stride arg in matrix.columnwise.load/store.

This patch adjusts the intrinsics definition of
llvm.matrix.column.major.load and llvm.matrix.column.major.store to
allow overloading the type of the stride. The bitwidth of the stride is
used to perform the offset computation.

This fixes a crash when using __builtin_matrix_column_major_load or
__builtin_matrix_column_major_store on 32 bit platforms. The stride argument
of the builtins are defined as `size_t`, which is 32 bits wide on 32 bit
platforms.

Note that we still perform offset computations with 64 bit width on 32
bit platforms for accesses that do not take a user-specified stride.
This can be fixed separately.

Fixes PR51304.

Reviewed By: erichkeane

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




More information about the All-commits mailing list