[ConstraintElimination] Make sure arguments of std:pow match.

This should fix a build failure on some systems, e.g. solaris11-sparcv9
http://lab.llvm.org:8014/#/builders/22
This commit is contained in:
Florian Hahn 2020-12-02 22:22:17 +00:00
parent c9be4ef184
commit 2304528bb5
1 changed files with 2 additions and 2 deletions

View File

@ -63,12 +63,12 @@ static SmallVector<std::pair<int64_t, Value *>, 4> decompose(Value *V) {
m_NUWShl(m_Value(Op0), m_ConstantInt(CI))))
return {{0, nullptr},
{1, GEP->getPointerOperand()},
{pow(2, CI->getSExtValue()), Op0}};
{std::pow(int64_t(2), CI->getSExtValue()), Op0}};
if (match(GEP->getOperand(GEP->getNumOperands() - 1),
m_ZExt(m_NUWShl(m_Value(Op0), m_ConstantInt(CI)))))
return {{0, nullptr},
{1, GEP->getPointerOperand()},
{pow(2, CI->getSExtValue()), Op0}};
{std::pow(int64_t(2), CI->getSExtValue()), Op0}};
return {{0, nullptr},
{1, GEP->getPointerOperand()},