float sin_core(float x) {
  float x4, x2;
  x2 = x * x;
  x4 = x2 * x2;
  return ((2.7181216275479732e-6 * x2 - 1.9839312269456257e-4) * x4 +
          (8.3333293048425631e-3 * x2 - 1.6666666640797048e-1)) *
             x2 * x +
         x;
}


x86 assembly (clang, -O0):
<sin_core>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xed8(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xed4(%rip),%xmm1
addsd  %xmm1,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm2
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xe9e(%rip),%xmm3
mulsd  %xmm3,%xmm1
movsd  0xe9a(%rip),%xmm3
addsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
movss  -0x4(%rbp),%xmm1
cvtss2sd %xmm1,%xmm2
movss  -0x4(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sin_core>:
cvtss2sd %xmm0,%xmm1
mulss  %xmm0,%xmm0
cvtss2sd %xmm0,%xmm2
mulss  %xmm0,%xmm0
movsd  0xee8(%rip),%xmm3
mulsd  %xmm2,%xmm3
addsd  0xee4(%rip),%xmm3
cvtss2sd %xmm0,%xmm0
mulsd  %xmm3,%xmm0
movsd  0xedc(%rip),%xmm3
mulsd  %xmm2,%xmm3
addsd  0xed8(%rip),%xmm3
addsd  %xmm0,%xmm3
mulsd  %xmm2,%xmm3
mulsd  %xmm1,%xmm3
addsd  %xmm1,%xmm3
xorps  %xmm0,%xmm0
cvtsd2ss %xmm3,%xmm0
ret

LLVM IR (-O0):
define float @sin_core(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca float
store float %0, float* %2
%5 = load float, float* %2
%6 = load float, float* %2
%7 = fmul float %5, %6
store float %7, float* %4
%8 = load float, float* %4
%9 = load float, float* %4
%10 = fmul float %8, %9
store float %10, float* %3
%11 = load float, float* %4
%12 = fpext float %11 to double
%13 = call double @llvm.fmuladd.f64(double 0x3EC6CD1F2AE7C82B, double %12, double 0xBF2A00F7F28C033C)
%14 = load float, float* %3
%15 = fpext float %14 to double
%16 = load float, float* %4
%17 = fpext float %16 to double
%18 = call double @llvm.fmuladd.f64(double 0x3F81111086A6164D, double %17, double 0xBFC5555554C71D15)
%19 = call double @llvm.fmuladd.f64(double %13, double %15, double %18)
%20 = load float, float* %4
%21 = fpext float %20 to double
%22 = fmul double %19, %21
%23 = load float, float* %2
%24 = fpext float %23 to double
%25 = load float, float* %2
%26 = fpext float %25 to double
%27 = call double @llvm.fmuladd.f64(double %22, double %24, double %26)
%28 = fptrunc double %27 to float
ret float %28
}

LLVM IR (-O2):
define float @sin_core(float %0) {
%2 = fmul float %0, %0
%3 = fmul float %2, %2
%4 = fpext float %2 to double
%5 = tail call double @llvm.fmuladd.f64(double %4, double 0x3EC6CD1F2AE7C82B, double 0xBF2A00F7F28C033C)
%6 = fpext float %3 to double
%7 = tail call double @llvm.fmuladd.f64(double %4, double 0x3F81111086A6164D, double 0xBFC5555554C71D15)
%8 = tail call double @llvm.fmuladd.f64(double %5, double %6, double %7)
%9 = fmul double %8, %4
%10 = fpext float %0 to double
%11 = tail call double @llvm.fmuladd.f64(double %9, double %10, double %10)
%12 = fptrunc double %11 to float
ret float %12
}