[all-commits] [llvm/llvm-project] ce5b13: [Matrix] Fix miscompile for NT matmul if the trans...

anemet via All-commits all-commits at lists.llvm.org
Thu Jul 22 10:47:17 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ce5b1320a7055befa118b86fb7d132721ab68c7e
      https://github.com/llvm/llvm-project/commit/ce5b1320a7055befa118b86fb7d132721ab68c7e
  Author: Adam Nemet <anemet at apple.com>
  Date:   2021-07-22 (Thu, 22 Jul 2021)

  Changed paths:
    M llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp
    M llvm/test/Transforms/LowerMatrixIntrinsics/multiply-right-transpose.ll

  Log Message:
  -----------
  [Matrix] Fix miscompile for NT matmul if the transpose has other use

We should only add the fake lowering entry for the matrix remark if the
transpose is not lowered on its own.  `MapVector::insert` is used to insert
the entry during proper lowering which does not overwrite the fake entry in
the map.

We actually had test coverage for this but the reference output code was
wrong; it was storing undef rather than the transposed column.

Also add an assert that would have caught this.

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




More information about the All-commits mailing list