This is an archive of the discontinued LLVM Phabricator instance.

Add matrix types extension tests .
ClosedPublic

Authored by fhahn on Jan 15 2020, 8:20 AM.

Details

Summary

This adds a set of initial tests that check that some of the matrix
types extension matches the spec.

Event Timeline

fhahn created this revision.Jan 15 2020, 8:20 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 15 2020, 8:20 AM
fhahn updated this revision to Diff 264092.May 14 2020, 2:18 PM

Update according to latest spec.

fhahn updated this revision to Diff 271962.Jun 19 2020, 2:32 AM

Removed matrix-builtins-spec.cpp -> matrix-types-spec.cpp

fhahn retitled this revision from [test-suite] Add matrix builtin tests (WIP). to Add matrix types extension tests ..Jun 19 2020, 2:33 AM
fhahn edited the summary of this revision. (Show Details)

ping. This is an initial step towards adding end-to-end tests for the matrix types extensions. Subsequently I am also planning on contributing some (micro) benchmarks.

This looks reasonable to me, but I don't know much about this test suite.

anemet accepted this revision.Jul 8 2020, 2:32 PM

LGTM.

This revision is now accepted and ready to land.Jul 8 2020, 2:32 PM
fhahn closed this revision.Jul 13 2020, 10:13 AM

Submitted as https://github.com/llvm/llvm-test-suite/commit/60cfbf7833b8039b938ce679bed89c738b519e1d

It looks like Phab doesn't auto-close test-suite patches.

plotfi added a subscriber: plotfi.Aug 15 2020, 2:51 PM

Hi

@fhahn I ran into an llvm_unreachable when building matrix-types-spec.cpp as part of an llvm-test-suite build using -Oz with -flto=thin. I reduced the IR that hit the unreachable to:

target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
target triple = "aarch64-unknown-linux-gnu"

define void @f(double* %Res) {
  tail call void @llvm.matrix.column.major.store.v275f64(<275 x double> undef, double* align 8 %Res, i64 25, i1 false, i32 25, i32 11)
  ret void
}

declare void @llvm.matrix.column.major.store.v275f64(<275 x double>, double* nocapture writeonly, i64, i1 immarg, i32 immarg, i32 immarg)

Repros through llc. Also repro'ed it on godbolt too: https://godbolt.org/z/rrGecn
The unreachable is in llvm::DAGTypeLegalizer::WidenVectorOperand.

Hope this is helpful.

-PL

Hi

@fhahn I ran into an llvm_unreachable when building matrix-types-spec.cpp as part of an llvm-test-suite build using -Oz with -flto=thin. I reduced the IR that hit the unreachable to:

Thanks for letting me know! Unfortunately the lowering pass is not enabled by default and there's no convenient way to pass the -enable-matrix flag through LTO. I hope to fix that soonish, but I'll check if it is easy to disable the test for LTO for now.

Good stuff. Thanks for replying so quickly @fhahn :-)

Hi

@fhahn I ran into an llvm_unreachable when building matrix-types-spec.cpp as part of an llvm-test-suite build using -Oz with -flto=thin. I reduced the IR that hit the unreachable to:

Thanks for letting me know! Unfortunately the lowering pass is not enabled by default and there's no convenient way to pass the -enable-matrix flag through LTO. I hope to fix that soonish, but I'll check if it is easy to disable the test for LTO for now.