 +Optional<CallingConv::ID>
 +TargetLibraryInfoImpl::getVectorizedFunctionCallingConv(
 +    StringRef F, const FunctionType &FTy, const DataLayout &DL) const {
-+  if (ClVectorLibrary == SVML) {
-+    assert(F.startswith("__svml"));
++  if (F.startswith("__svml")) {
 +    return getSVMLCallingConv(DL, FTy);
 +  }
 +  return {};

From d7ee1644d27469fed4e2b91b70eddf0c1124e6a3 Mon Sep 17 00:00:00 2001
From: Ivan Butygin <ivan.butygin@intel.com>
Date: Tue, 8 Sep 2020 19:22:12 +0300
Subject: [PATCH] Fixes vectorizer and extends SVML support

Patch was updated to fix SVML calling convention issues uncovered by llvm 10.
In previous versions of patch SVML calling convention was selected based on

 utils/TableGen/TableGen.cpp                        |   8 +-
 utils/TableGen/TableGenBackends.h                  |   1 +
 utils/vim/syntax/llvm.vim                          |   1 +
 26 files changed, 1314 insertions(+), 48 deletions(-)
 create mode 100644 llvm/include/llvm/IR/SVML.td
 create mode 100644 llvm/test/Transforms/LoopVectorize/X86/svml-legal-calls.ll
 create mode 100644 llvm/test/Transforms/LoopVectorize/X86/svml-legal-codegen.ll
