Skip to content

Commit 711f42d

Browse files
committed
Use one getPartialReductionExtendKind in the other
1 parent 700d0d6 commit 711f42d

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

llvm/lib/Analysis/TargetTransformInfo.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -986,11 +986,10 @@ InstructionCost TargetTransformInfo::getShuffleCost(
986986

987987
TargetTransformInfo::PartialReductionExtendKind
988988
TargetTransformInfo::getPartialReductionExtendKind(Instruction *I) {
989-
if (isa<SExtInst>(I))
990-
return PR_SignExtend;
991-
if (isa<ZExtInst>(I))
992-
return PR_ZeroExtend;
993-
return PR_None;
989+
auto *Cast = dyn_cast<CastInst>(I);
990+
if (!Cast)
991+
return PR_None;
992+
return getPartialReductionExtendKind(Cast->getOpcode());
994993
}
995994

996995
TargetTransformInfo::PartialReductionExtendKind

0 commit comments

Comments
 (0)