float __p_exp_ln2(const float x) {
  const float a1 = -0.9998684f;
  const float a2 = 0.4982926f;
  const float a3 = -0.1595332f;
  const float a4 = 0.0293641f;
  float exp_x;
  exp_x = 1.f + a1 * x + a2 * x * x + a3 * x * x * x + a4 * x * x * x * x;
  return 1.f / exp_x;
}


x86 assembly (clang, -O0):
<__p_exp_ln2>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeff(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xeee(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xedd(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xecc(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x4(%rbp),%xmm1
movss  0xec6(%rip),%xmm0
mulss  %xmm0,%xmm1
movss  0xeaa(%rip),%xmm0
addss  %xmm0,%xmm1
movss  0xeaa(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  -0x4(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  0xe8c(%rip),%xmm1
mulss  -0x4(%rbp),%xmm1
mulss  -0x4(%rbp),%xmm1
movss  -0x4(%rbp),%xmm2
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  0xe69(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  -0x4(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  0xe3c(%rip),%xmm0
divss  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<__p_exp_ln2>:
movss  0xef8(%rip),%xmm2
mulss  %xmm0,%xmm2
movss  0xef0(%rip),%xmm1
addss  %xmm1,%xmm2
movss  0xee8(%rip),%xmm3
mulss  %xmm0,%xmm3
mulss  %xmm0,%xmm3
addss  %xmm2,%xmm3
movss  0xed8(%rip),%xmm2
mulss  %xmm0,%xmm2
mulss  %xmm0,%xmm2
mulss  %xmm0,%xmm2
addss  %xmm3,%xmm2
movss  0xec4(%rip),%xmm3
mulss  %xmm0,%xmm3
mulss  %xmm0,%xmm3
mulss  %xmm0,%xmm3
mulss  %xmm0,%xmm3
addss  %xmm2,%xmm3
divss  %xmm3,%xmm1
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @__p_exp_ln2(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store float %0, float* %2
store float 0xBFEFFEEC00000000, float* %3
store float 0x3FDFE406A0000000, float* %4
store float 0xBFC46B9580000000, float* %5
store float 0x3F9E119F60000000, float* %6
%8 = load float, float* %2
%9 = call float @llvm.fmuladd.f32(float 0xBFEFFEEC00000000, float %8, float 1.000000e+00)
%10 = load float, float* %2
%11 = fmul float 0x3FDFE406A0000000, %10
%12 = load float, float* %2
%13 = call float @llvm.fmuladd.f32(float %11, float %12, float %9)
%14 = load float, float* %2
%15 = fmul float 0xBFC46B9580000000, %14
%16 = load float, float* %2
%17 = fmul float %15, %16
%18 = load float, float* %2
%19 = call float @llvm.fmuladd.f32(float %17, float %18, float %13)
%20 = load float, float* %2
%21 = fmul float 0x3F9E119F60000000, %20
%22 = load float, float* %2
%23 = fmul float %21, %22
%24 = load float, float* %2
%25 = fmul float %23, %24
%26 = load float, float* %2
%27 = call float @llvm.fmuladd.f32(float %25, float %26, float %19)
store float %27, float* %7
%28 = load float, float* %7
%29 = fdiv float 1.000000e+00, %28
ret float %29
}

LLVM IR (-O2):
define float @__p_exp_ln2(float %0) {
%2 = tail call float @llvm.fmuladd.f32(float %0, float 0xBFEFFEEC00000000, float 1.000000e+00)
%3 = fmul float %0, 0x3FDFE406A0000000
%4 = tail call float @llvm.fmuladd.f32(float %3, float %0, float %2)
%5 = fmul float %0, 0xBFC46B9580000000
%6 = fmul float %5, %0
%7 = tail call float @llvm.fmuladd.f32(float %6, float %0, float %4)
%8 = fmul float %0, 0x3F9E119F60000000
%9 = fmul float %8, %0
%10 = fmul float %9, %0
%11 = tail call float @llvm.fmuladd.f32(float %10, float %0, float %7)
%12 = fdiv float 1.000000e+00, %11
ret float %12
}