Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions llvm/lib/Analysis/TargetLibraryInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ StringLiteral const TargetLibraryInfoImpl::StandardNames[LibFunc::NumLibFuncs] =
};

std::string VecDesc::getVectorFunctionABIVariantString() const {
assert(!VectorFnName.empty() && "Vector function name must not be empty.");
SmallString<256> Buffer;
llvm::raw_svector_ostream Out(Buffer);
Out << VABIPrefix << "_" << ScalarFnName << "(" << VectorFnName << ")";
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Transforms/Utils/InjectTLIMappings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ static void addMappingsFromTLI(const TargetLibraryInfo &TLI, CallInst &CI) {

auto AddVariantDecl = [&](const ElementCount &VF, bool Predicate) {
const VecDesc *VD = TLI.getVectorMappingInfo(ScalarName, VF, Predicate);
if (VD) {
if (VD && !VD->getVectorFnName().empty()) {
std::string MangledName = VD->getVectorFunctionABIVariantString();
if (!OriginalSetOfMappings.count(MangledName)) {
Mappings.push_back(MangledName);
Expand Down