Skip to content

Commit 3be955a

Browse files
committed
[NFC] Remove dead code
There's an early exit branch a couple of lines earlier for `MVT == f64`. Convert to an assert rather than using the duplicate ternary here. This silences an opinionated static analyser that's been bugging me.
1 parent 216ba6b commit 3be955a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -745,8 +745,8 @@ GCNTTIImpl::getIntrinsicInstrCost(const IntrinsicCostAttributes &ICA,
745745
case Intrinsic::copysign:
746746
return NElts * getFullRateInstrCost();
747747
case Intrinsic::canonicalize: {
748-
InstRate =
749-
SLT == MVT::f64 ? get64BitInstrCost(CostKind) : getFullRateInstrCost();
748+
assert(SLT != MVT::f64);
749+
InstRate = getFullRateInstrCost();
750750
break;
751751
}
752752
case Intrinsic::uadd_sat:

0 commit comments

Comments
 (0)