diff options
author | Craig Topper <craig.topper@intel.com> | 2020-04-08 16:59:36 -0700 |
---|---|---|
committer | Craig Topper <craig.topper@intel.com> | 2020-04-08 17:41:16 -0700 |
commit | f3d3cec648202cde1f34b766b4d8fe147f68f1fe (patch) | |
tree | b3d0e947ea291b95ae54fcf313c28d52b971fd5e | |
parent | 0985554b709fe6856a2cb77f3739cdeb1bbf9ba5 (diff) | |
download | llvm-f3d3cec648202cde1f34b766b4d8fe147f68f1fe.zip llvm-f3d3cec648202cde1f34b766b4d8fe147f68f1fe.tar.gz llvm-f3d3cec648202cde1f34b766b4d8fe147f68f1fe.tar.bz2 |
[InstCombine] Avoid a call to deprecated version of CreateCall.
Passing a Value * to CreateCall has to call getPointerElementType
to find the type of the pointer.
In this case we can rely on the fact that Intrinsic::getDeclaration
returns a Function * and use that version of CreateCall.
-rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp index 26837a1..377d0be 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp @@ -2324,8 +2324,8 @@ Instruction *InstCombiner::visitCallInst(CallInst &CI) { if (match(II->getArgOperand(0), m_OneUse(m_FPExt(m_Value(ExtSrc0)))) && match(II->getArgOperand(1), m_OneUse(m_FPExt(m_Value(ExtSrc1)))) && ExtSrc0->getType() == ExtSrc1->getType()) { - Value *F = Intrinsic::getDeclaration(II->getModule(), II->getIntrinsicID(), - { ExtSrc0->getType() }); + Function *F = Intrinsic::getDeclaration( + II->getModule(), II->getIntrinsicID(), {ExtSrc0->getType()}); CallInst *NewCall = Builder.CreateCall(F, { ExtSrc0, ExtSrc1 }); NewCall->copyFastMathFlags(II); NewCall->takeName(II); |