https://gcc.gnu.org/bugzilla/show_bug.cgi?id=29550
--- Comment #12 from Thomas Koenig <tkoenig at gcc dot gnu.org> --- Created attachment 44600 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44600&action=edit Patch which has a problem The attached patch shows how something could be done, but it has one problem: The handling of -fblas-matmul-limit . If we change the arguments to the matmul call, it would be _necessary_ to always call the external function, otherwise there would be wrong code.