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:
parent
8e9ad7f299
commit
26a2cdd354
@ -1244,7 +1244,7 @@ Value *LibCallSimplifier::replacePowWithSqrt(CallInst *Pow, IRBuilder<> &B) {
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
// If errno is never set, then use the intrinsic for sqrt().
|
// 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(),
|
Function *SqrtFn = Intrinsic::getDeclaration(Pow->getModule(),
|
||||||
Intrinsic::sqrt, Ty);
|
Intrinsic::sqrt, Ty);
|
||||||
Sqrt = B.CreateCall(SqrtFn, Base, "sqrt");
|
Sqrt = B.CreateCall(SqrtFn, Base, "sqrt");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user