[PATCH] D107349: [Matrix] Overload stride arg in matrix.columnwise.load/store.
Florian Hahn via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 3 06:48:40 PDT 2021
fhahn created this revision.
fhahn added reviewers: rjmccall, anemet, thegameg, erichkeane.
Herald added subscribers: dexonsmith, jdoerfert, tschuett, hiraditya.
fhahn requested review of this revision.
Herald added projects: clang, LLVM.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D107349
Files:
clang/test/CodeGen/matrix-type-builtins.c
clang/test/CodeGenCXX/matrix-type-builtins.cpp
clang/test/CodeGenObjC/matrix-type-builtins.m
llvm/docs/LangRef.rst
llvm/include/llvm/IR/Intrinsics.td
llvm/include/llvm/IR/MatrixBuilder.h
llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp
llvm/test/Transforms/LowerMatrixIntrinsics/strided-load-double.ll
llvm/test/Transforms/LowerMatrixIntrinsics/strided-store-double.ll
llvm/test/Verifier/matrix-intrinsics.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107349.363723.patch
Type: text/x-patch
Size: 58287 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210803/f5c0bb6f/attachment-0001.bin>
More information about the cfe-commits
mailing list