Skip to content

Commit 99bae91

Browse files
committed
Use one getPartialReductionExtendKind in the other
1 parent bb31e27 commit 99bae91

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
@@ -995,11 +995,10 @@ InstructionCost TargetTransformInfo::getShuffleCost(
995995

996996
TargetTransformInfo::PartialReductionExtendKind
997997
TargetTransformInfo::getPartialReductionExtendKind(Instruction *I) {
998-
if (isa<SExtInst>(I))
999-
return PR_SignExtend;
1000-
if (isa<ZExtInst>(I))
1001-
return PR_ZeroExtend;
1002-
return PR_None;
998+
auto *Cast = dyn_cast<CastInst>(I);
999+
if (!Cast)
1000+
return PR_None;
1001+
return getPartialReductionExtendKind(Cast->getOpcode());
10031002
}
10041003

10051004
TargetTransformInfo::PartialReductionExtendKind

0 commit comments

Comments
 (0)