diff --git a/llvm/lib/Analysis/VectorUtils.cpp b/llvm/lib/Analysis/VectorUtils.cpp index 9c3bf7df89b2..9ebb01684c8a 100644 --- a/llvm/lib/Analysis/VectorUtils.cpp +++ b/llvm/lib/Analysis/VectorUtils.cpp @@ -966,6 +966,12 @@ void InterleavedAccessInfo::invalidateGroupsRequiringScalarEpilogue() { RequiresScalarEpilogue = false; } +template +void InterleaveGroup::addMetadata(InstT *NewInst) const { + llvm_unreachable("addMetadata can only be used for Instruction"); +} + +namespace llvm { template <> void InterleaveGroup::addMetadata(Instruction *NewInst) const { SmallVector VL; @@ -973,8 +979,4 @@ void InterleaveGroup::addMetadata(Instruction *NewInst) const { [](std::pair p) { return p.second; }); propagateMetadata(NewInst, VL); } - -template -void InterleaveGroup::addMetadata(InstT *NewInst) const { - llvm_unreachable("addMetadata can only be used for Instruction"); }