1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-02-01 05:01:59 +01:00

[NFC] Refactor simplification of pow()

llvm-svn: 340476
This commit is contained in:
Evandro Menezes 2018-08-22 23:18:02 +00:00
parent 8e9ad7f299
commit 26a2cdd354

View File

@ -1244,7 +1244,7 @@ Value *LibCallSimplifier::replacePowWithSqrt(CallInst *Pow, IRBuilder<> &B) {
return nullptr;
// If errno is never set, then use the intrinsic for sqrt().
if (Pow->hasFnAttr(Attribute::ReadNone)) {
if (Pow->doesNotAccessMemory()) {
Function *SqrtFn = Intrinsic::getDeclaration(Pow->getModule(),
Intrinsic::sqrt, Ty);
Sqrt = B.CreateCall(SqrtFn, Base, "sqrt");