@@ -2082,15 +2082,15 @@ Value *LibCallSimplifier::replacePowWithExp(CallInst *Pow, IRBuilderBase &B) {
2082
2082
// Evaluate special cases related to a constant base.
2083
2083
2084
2084
const APFloat *BaseF;
2085
- if (!match (Pow-> getArgOperand ( 0 ) , m_APFloat (BaseF)))
2085
+ if (!match (Base , m_APFloat (BaseF)))
2086
2086
return nullptr ;
2087
2087
2088
2088
AttributeList NoAttrs; // Attributes are only meaningful on the original call
2089
2089
2090
2090
const bool UseIntrinsic = Pow->doesNotAccessMemory ();
2091
2091
2092
2092
// pow(2.0, itofp(x)) -> ldexp(1.0, x)
2093
- if ((UseIntrinsic || !Ty->isVectorTy ()) && match (Base, m_SpecificFP ( 2.0 ) ) &&
2093
+ if ((UseIntrinsic || !Ty->isVectorTy ()) && BaseF-> isExactlyValue ( 2.0 ) &&
2094
2094
(isa<SIToFPInst>(Expo) || isa<UIToFPInst>(Expo)) &&
2095
2095
(UseIntrinsic ||
2096
2096
hasFloatFn (M, TLI, Ty, LibFunc_ldexp, LibFunc_ldexpf, LibFunc_ldexpl))) {
@@ -2137,7 +2137,7 @@ Value *LibCallSimplifier::replacePowWithExp(CallInst *Pow, IRBuilderBase &B) {
2137
2137
}
2138
2138
2139
2139
// pow(10.0, x) -> exp10(x)
2140
- if (match (Base, m_SpecificFP ( 10.0 ) ) &&
2140
+ if (BaseF-> isExactlyValue ( 10.0 ) &&
2141
2141
hasFloatFn (M, TLI, Ty, LibFunc_exp10, LibFunc_exp10f, LibFunc_exp10l)) {
2142
2142
2143
2143
if (Pow->doesNotAccessMemory ()) {
0 commit comments