@@ -280,7 +280,6 @@ class ScalarizerVisitor : public InstVisitor<ScalarizerVisitor, bool> {
280280 bool visit (Function &F);
281281
282282 bool isTriviallyScalarizable (Intrinsic::ID ID);
283- bool isIntrinsicWithOverloadTypeAtArg (Intrinsic::ID ID, int ScalarOpdIdx);
284283
285284 // InstVisitor methods. They return true if the instruction was scalarized,
286285 // false if nothing changed.
@@ -697,13 +696,6 @@ bool ScalarizerVisitor::isTriviallyScalarizable(Intrinsic::ID ID) {
697696 TTI->isTargetIntrinsicTriviallyScalarizable (ID);
698697}
699698
700- bool ScalarizerVisitor::isIntrinsicWithOverloadTypeAtArg (Intrinsic::ID ID,
701- int ScalarOpdIdx) {
702- return Intrinsic::isTargetIntrinsic (ID)
703- ? TTI->isVectorIntrinsicWithOverloadTypeAtArg (ID, ScalarOpdIdx)
704- : isVectorIntrinsicWithOverloadTypeAtArg (ID, ScalarOpdIdx);
705- }
706-
707699// / If a call to a vector typed intrinsic function, split into a scalar call per
708700// / element if possible for the intrinsic.
709701bool ScalarizerVisitor::splitCall (CallInst &CI) {
@@ -735,7 +727,7 @@ bool ScalarizerVisitor::splitCall(CallInst &CI) {
735727
736728 SmallVector<llvm::Type *, 3 > Tys;
737729 // Add return type if intrinsic is overloaded on it.
738- if (isIntrinsicWithOverloadTypeAtArg (ID, -1 ))
730+ if (isVectorIntrinsicWithOverloadTypeAtArg (ID, -1 , TTI ))
739731 Tys.push_back (VS->SplitTy );
740732
741733 if (AreAllVectorsOfMatchingSize) {
@@ -775,13 +767,13 @@ bool ScalarizerVisitor::splitCall(CallInst &CI) {
775767 }
776768
777769 Scattered[I] = scatter (&CI, OpI, *OpVS);
778- if (isIntrinsicWithOverloadTypeAtArg (ID, I)) {
770+ if (isVectorIntrinsicWithOverloadTypeAtArg (ID, I, TTI )) {
779771 OverloadIdx[I] = Tys.size ();
780772 Tys.push_back (OpVS->SplitTy );
781773 }
782774 } else {
783775 ScalarOperands[I] = OpI;
784- if (isIntrinsicWithOverloadTypeAtArg (ID, I))
776+ if (isVectorIntrinsicWithOverloadTypeAtArg (ID, I, TTI ))
785777 Tys.push_back (OpI->getType ());
786778 }
787779 }
0 commit comments