mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 22:24:07 +00:00
Apply transformation on OS X 10.9+ and iOS 7.0+: pow(10, x) ―> __exp10(x)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196544 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1162,6 +1162,12 @@ struct PowOpt : public UnsafeFPLibCallOptimization {
|
||||
hasUnaryFloatFn(TLI, Op1->getType(), LibFunc::exp2, LibFunc::exp2f,
|
||||
LibFunc::exp2l))
|
||||
return EmitUnaryFloatFnCall(Op2, "exp2", B, Callee->getAttributes());
|
||||
// pow(10.0, x) -> exp10(x)
|
||||
if (Op1C->isExactlyValue(10.0) &&
|
||||
hasUnaryFloatFn(TLI, Op1->getType(), LibFunc::exp10, LibFunc::exp10f,
|
||||
LibFunc::exp10l))
|
||||
return EmitUnaryFloatFnCall(Op2, TLI->getName(LibFunc::exp10), B,
|
||||
Callee->getAttributes());
|
||||
}
|
||||
|
||||
ConstantFP *Op2C = dyn_cast<ConstantFP>(Op2);
|
||||
|
Reference in New Issue
Block a user