double g_blend(double u, double q) {
  return (u * (q + u * (2 * q + u * (8 - 12 * q +
                                     u * (14 * q - 11 + u * (4 - 5 * q))))));
}


x86 assembly (clang, -O0):
<g_blend>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm3
movsd  -0x8(%rbp),%xmm4
movsd  -0x10(%rbp),%xmm6
movsd  0xeec(%rip),%xmm5
mulsd  %xmm5,%xmm6
movsd  0xee8(%rip),%xmm5
addsd  %xmm5,%xmm6
movsd  -0x8(%rbp),%xmm5
movsd  -0x10(%rbp),%xmm8
movsd  0xeb9(%rip),%xmm7
mulsd  %xmm7,%xmm8
movsd  0xeb4(%rip),%xmm7
addsd  %xmm7,%xmm8
movsd  -0x8(%rbp),%xmm7
movsd  -0x10(%rbp),%xmm9
movsd  0xe83(%rip),%xmm10
mulsd  %xmm10,%xmm9
movsd  0xe7d(%rip),%xmm10
addsd  %xmm10,%xmm9
mulsd  %xmm9,%xmm7
addsd  %xmm8,%xmm7
mulsd  %xmm7,%xmm5
addsd  %xmm6,%xmm5
mulsd  %xmm5,%xmm4
addsd  %xmm3,%xmm3
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<g_blend>:
movsd  0xef8(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xef4(%rip),%xmm2
movsd  0xef4(%rip),%xmm3
mulsd  %xmm1,%xmm3
addsd  0xef0(%rip),%xmm3
movsd  0xef0(%rip),%xmm4
mulsd  %xmm1,%xmm4
addsd  0xeec(%rip),%xmm4
mulsd  %xmm0,%xmm4
addsd  %xmm3,%xmm4
mulsd  %xmm0,%xmm4
addsd  %xmm2,%xmm4
mulsd  %xmm0,%xmm4
movapd %xmm1,%xmm2
addsd  %xmm1,%xmm2
addsd  %xmm4,%xmm2
mulsd  %xmm0,%xmm2
addsd  %xmm1,%xmm2
mulsd  %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @g_blend(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = load double, double* %3
%8 = load double, double* %4
%9 = load double, double* %3
%10 = load double, double* %4
%11 = call double @llvm.fmuladd.f64(double -1.200000e+01, double %10, double 8.000000e+00)
%12 = load double, double* %3
%13 = load double, double* %4
%14 = call double @llvm.fmuladd.f64(double 1.400000e+01, double %13, double -1.100000e+01)
%15 = load double, double* %3
%16 = load double, double* %4
%17 = call double @llvm.fmuladd.f64(double -5.000000e+00, double %16, double 4.000000e+00)
%18 = call double @llvm.fmuladd.f64(double %15, double %17, double %14)
%19 = call double @llvm.fmuladd.f64(double %12, double %18, double %11)
%20 = fmul double %9, %19
%21 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %8, double %20)
%22 = call double @llvm.fmuladd.f64(double %7, double %21, double %6)
%23 = fmul double %5, %22
ret double %23
}

LLVM IR (-O2):
define double @g_blend(double %0, double %1) {
%3 = tail call double @llvm.fmuladd.f64(double %1, double -1.200000e+01, double 8.000000e+00)
%4 = tail call double @llvm.fmuladd.f64(double %1, double 1.400000e+01, double -1.100000e+01)
%5 = tail call double @llvm.fmuladd.f64(double %1, double -5.000000e+00, double 4.000000e+00)
%6 = tail call double @llvm.fmuladd.f64(double %0, double %5, double %4)
%7 = tail call double @llvm.fmuladd.f64(double %0, double %6, double %3)
%8 = fmul double %7, %0
%9 = tail call double @llvm.fmuladd.f64(double %1, double 2.000000e+00, double %8)
%10 = tail call double @llvm.fmuladd.f64(double %0, double %9, double %1)
%11 = fmul double %10, %0
ret double %11
}