fabs not being inlined?
NaN
divide at by.zero
Thu Feb 7 23:26:20 UTC 2019
module ohreally;
import std.math;
float foo(float y, float x)
{
float ax = fabs(x);
float ay = fabs(y);
return ax*ay/3.142f;
}
====>
float ohreally.foo(float, float):
push rax
movss dword ptr [rsp + 4], xmm1
call pure nothrow @nogc @safe float
std.math.fabs(float)@PLT
movss dword ptr [rsp], xmm0
movss xmm0, dword ptr [rsp + 4]
call pure nothrow @nogc @safe float
std.math.fabs(float)@PLT
mulss xmm0, dword ptr [rsp]
divss xmm0, dword ptr [rip + .LCPI0_0]
pop rax
ret
Compiled with -O3
Is there something I need to do to get fabs() inlined?
More information about the digitalmars-d-ldc
mailing list