This is an archive of the discontinued LLVM Phabricator instance.

[Matrix] Run simple version of lowering in backend.
AcceptedPublic

Authored by fhahn on Mar 26 2020, 9:05 AM.

Details

Summary

The lowering of the matrix intrinsics is done by the
LowerMatrixIntrinsics pass, which usually runs as part of the
middle-end. The backends do not know how to lower the various matrix
intrinsics however. To avoid llc crashing on IR containing matrix
intrinsics we run a simple/minimal lowering pass, which has no
dependencies besides TTI unconditionally. It will be a no-op for
functions not marked with the may-contain-matrix-intrinsics attribute.

Fixes PR45227.

Diff Detail

Event Timeline

fhahn created this revision.Mar 26 2020, 9:05 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 26 2020, 9:05 AM
This revision is now accepted and ready to land.Mar 26 2020, 9:18 AM
fhahn added a comment.Jul 16 2020, 9:43 AM

I won't submit the patch as-is, as it seems there are some minor compile-time regressions (http://llvm-compile-time-tracker.com/compare.php?from=49ac7c375aeaf54b698a93c9e3dea173c50fc455&to=99a8726f6f25554afc0b924fe87944b6ce376e33&stat=instructions) which I'd rather avoid. I'll get back to this once we have a better way to detect whether there are any matrix intrinsics to lower.