Skip to content

Commit df90c48

Browse files
committed
update ReplaceWithVeclib uses
- this pass is used to replace a vectorizable intrinsic function with a generic veclib function - we make the assumption that a target specific intrinisc is not going to be replaced with a generic function call and so we don't need to provide the TTI
1 parent 7ff6fb7 commit df90c48

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

llvm/lib/CodeGen/ReplaceWithVeclib.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,17 @@ static bool replaceWithCallToVeclib(const TargetLibraryInfo &TLI,
110110

111111
// OloadTys collects types used in scalar intrinsic overload name.
112112
SmallVector<Type *, 3> OloadTys;
113-
if (!RetTy->isVoidTy() && isVectorIntrinsicWithOverloadTypeAtArg(IID, -1))
113+
if (!RetTy->isVoidTy() &&
114+
isVectorIntrinsicWithOverloadTypeAtArg(IID, -1, /*TTI=*/nullptr))
114115
OloadTys.push_back(ScalarRetTy);
115116

116117
// Compute the argument types of the corresponding scalar call and check that
117118
// all vector operands match the previously found EC.
118119
SmallVector<Type *, 8> ScalarArgTypes;
119120
for (auto Arg : enumerate(II->args())) {
120121
auto *ArgTy = Arg.value()->getType();
121-
bool IsOloadTy = isVectorIntrinsicWithOverloadTypeAtArg(IID, Arg.index());
122+
bool IsOloadTy = isVectorIntrinsicWithOverloadTypeAtArg(IID, Arg.index(),
123+
/*TTI=*/nullptr);
122124
if (isVectorIntrinsicWithScalarOpAtArg(IID, Arg.index())) {
123125
ScalarArgTypes.push_back(ArgTy);
124126
if (IsOloadTy)

0 commit comments

Comments
 (0)