double poly8(double x, double c1, double c2, double c3, double c4) {
  return x *
         (1 -
          x * (0.5 -
               x * (c1 -
                    x * (0.25 - x * (c2 - x * (c3 - x * (c4 - x * 0.125)))))));
}


x86 assembly (clang, -O0):
<poly8>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm4
movsd  -0x8(%rbp),%xmm3
movsd  -0x8(%rbp),%xmm5
movsd  -0x18(%rbp),%xmm7
movsd  -0x8(%rbp),%xmm6
movsd  -0x20(%rbp),%xmm9
movsd  -0x8(%rbp),%xmm8
movsd  -0x28(%rbp),%xmm11
movsd  -0x8(%rbp),%xmm10
movq   %xmm10,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm10
movsd  0xe9b(%rip),%xmm12
mulsd  %xmm12,%xmm10
addsd  %xmm11,%xmm10
movq   %xmm8,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm8
mulsd  %xmm10,%xmm8
addsd  %xmm9,%xmm8
movq   %xmm6,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm6
mulsd  %xmm8,%xmm6
addsd  %xmm7,%xmm6
movq   %xmm5,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm5
mulsd  %xmm6,%xmm5
movsd  0xe25(%rip),%xmm6
addsd  %xmm6,%xmm5
movq   %xmm3,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm3
mulsd  %xmm5,%xmm3
addsd  %xmm4,%xmm3
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm2
movsd  0xdd7(%rip),%xmm3
addsd  %xmm3,%xmm2
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
movsd  0xda8(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<poly8>:
movsd  0xef8(%rip),%xmm5
mulsd  %xmm0,%xmm5
addsd  %xmm4,%xmm5
mulsd  %xmm0,%xmm5
subsd  %xmm5,%xmm3
mulsd  %xmm0,%xmm3
subsd  %xmm3,%xmm2
mulsd  %xmm0,%xmm2
movsd  0xedc(%rip),%xmm3
subsd  %xmm2,%xmm3
mulsd  %xmm0,%xmm3
subsd  %xmm3,%xmm1
mulsd  %xmm0,%xmm1
movsd  0xecc(%rip),%xmm2
subsd  %xmm1,%xmm2
mulsd  %xmm0,%xmm2
movsd  0xec4(%rip),%xmm1
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @poly8(double %0, double %1, double %2, double %3, double %4) {
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
store double %0, double* %6
store double %1, double* %7
store double %2, double* %8
store double %3, double* %9
store double %4, double* %10
%11 = load double, double* %6
%12 = load double, double* %6
%13 = load double, double* %6
%14 = load double, double* %7
%15 = load double, double* %6
%16 = load double, double* %6
%17 = load double, double* %8
%18 = load double, double* %6
%19 = load double, double* %9
%20 = load double, double* %6
%21 = load double, double* %10
%22 = load double, double* %6
%23 = fneg double %22
%24 = call double @llvm.fmuladd.f64(double %23, double 1.250000e-01, double %21)
%25 = fneg double %20
%26 = call double @llvm.fmuladd.f64(double %25, double %24, double %19)
%27 = fneg double %18
%28 = call double @llvm.fmuladd.f64(double %27, double %26, double %17)
%29 = fneg double %16
%30 = call double @llvm.fmuladd.f64(double %29, double %28, double 2.500000e-01)
%31 = fneg double %15
%32 = call double @llvm.fmuladd.f64(double %31, double %30, double %14)
%33 = fneg double %13
%34 = call double @llvm.fmuladd.f64(double %33, double %32, double 5.000000e-01)
%35 = fneg double %12
%36 = call double @llvm.fmuladd.f64(double %35, double %34, double 1.000000e+00)
%37 = fmul double %11, %36
ret double %37
}

LLVM IR (-O2):
define double @poly8(double %0, double %1, double %2, double %3, double %4) {
%6 = fneg double %0
%7 = tail call double @llvm.fmuladd.f64(double %6, double 1.250000e-01, double %4)
%8 = tail call double @llvm.fmuladd.f64(double %6, double %7, double %3)
%9 = tail call double @llvm.fmuladd.f64(double %6, double %8, double %2)
%10 = tail call double @llvm.fmuladd.f64(double %6, double %9, double 2.500000e-01)
%11 = tail call double @llvm.fmuladd.f64(double %6, double %10, double %1)
%12 = tail call double @llvm.fmuladd.f64(double %6, double %11, double 5.000000e-01)
%13 = tail call double @llvm.fmuladd.f64(double %6, double %12, double 1.000000e+00)
%14 = fmul double %13, %0
ret double %14
}