We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 700d0d6 commit 711f42dCopy full SHA for 711f42d
llvm/lib/Analysis/TargetTransformInfo.cpp
@@ -986,11 +986,10 @@ InstructionCost TargetTransformInfo::getShuffleCost(
986
987
TargetTransformInfo::PartialReductionExtendKind
988
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;
+ auto *Cast = dyn_cast<CastInst>(I);
+ if (!Cast)
+ return PR_None;
+ return getPartialReductionExtendKind(Cast->getOpcode());
994
}
995
996
0 commit comments