[llvm] Fix scalar overload name constructed by ReplaceWithVeclib.cpp (PR #111095)
Tex Riddell via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 10 15:49:20 PDT 2024
================
@@ -108,8 +108,22 @@ static bool replaceWithCallToVeclib(const TargetLibraryInfo &TLI,
// all vector operands match the previously found EC.
SmallVector<Type *, 8> ScalarArgTypes;
Intrinsic::ID IID = II->getIntrinsicID();
+
+ // OloadTys collects types used in scalar intrinsic overload name.
+ SmallVector<Type *, 3> OloadTys;
+ if (VTy && isVectorIntrinsicWithOverloadTypeAtArg(IID, -1))
+ OloadTys.push_back(VTy->getElementType());
+
for (auto Arg : enumerate(II->args())) {
auto *ArgTy = Arg.value()->getType();
+ // Gather type if it is used in the overload name.
+ if (isVectorIntrinsicWithOverloadTypeAtArg(IID, Arg.index())) {
----------------
tex3d wrote:
There are three tests impacted by this change. If you think there's a specific deficiency at this point not addressed by existing testing, please let me know. For now, I'll be resolving this comment. Please re-activate if you think it still needs addressing.
https://github.com/llvm/llvm-project/pull/111095
More information about the llvm-commits
mailing list