Current clang generates extra set of simd variant function attribute
with extra 'v' encoding.
For example:
_ZGVbN2vZ5add_1Pf vs _ZGVbN2vvZ5add_1Pf
The problem is due to declaration of ParamAttrs following:
llvm::SmallVector<ParamAttrTy, 8> ParamAttrs(ParamPositions.size());
where ParamPositions.size() is grown after following assignment:
Pos = ParamPositions[PVD];
So the PVD is not find in ParamPositions.
The problem is ParamPositions need to set for each FD decl. To fix this
Move ParamPositions's init inside while loop for each FD.
I would also recommend to replace all operator [] calls to something that does not modify the map, like find.