double interp_weno3(double phim1, double phi, double phip1) {
  const double p0 = (-1.0 / 2.0) * phim1 + (3.0 / 2.0) * phi;
  const double p1 = (1.0 / 2.0) * phi + (1.0 / 2.0) * phip1;
  const double beta1 = (phip1 - phi) * (phip1 - phi);
  const double beta0 = (phi - phim1) * (phi - phim1);
  const double alpha0 = (1.0 / 3.0) / ((beta0 + 1e-10) * (beta0 + 1.0e-10));
  const double alpha1 = (2.0 / 3.0) / ((beta1 + 1e-10) * (beta1 + 1.0e-10));
  const double alpha_sum_inv = 1.0 / (alpha0 + alpha1);
  const double w0 = alpha0 * alpha_sum_inv;
  const double w1 = alpha1 * alpha_sum_inv;
  return w0 * p0 + w1 * p1;
}


x86 assembly (clang, -O0):
<interp_weno3>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xf10(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
movsd  0xefb(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xed9(%rip),%xmm1
mulsd  -0x18(%rbp),%xmm1
movsd  0xecc(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
subsd  -0x8(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xe6d(%rip),%xmm1
addsd  -0x38(%rbp),%xmm1
movsd  0xe60(%rip),%xmm0
addsd  -0x38(%rbp),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xe57(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xe3e(%rip),%xmm1
addsd  -0x30(%rbp),%xmm1
movsd  0xe31(%rip),%xmm0
addsd  -0x30(%rbp),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xe18(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x40(%rbp),%xmm1
addsd  -0x48(%rbp),%xmm1
movsd  0xdf5(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x40(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x48(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  -0x28(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<interp_weno3>:
movsd  0xef8(%rip),%xmm4
mulsd  %xmm1,%xmm4
movsd  0xef4(%rip),%xmm3
mulsd  %xmm0,%xmm3
addsd  %xmm4,%xmm3
movsd  0xeec(%rip),%xmm4
movapd %xmm1,%xmm5
unpcklpd %xmm2,%xmm5
mulsd  %xmm4,%xmm2
mulsd  %xmm1,%xmm4
addsd  %xmm2,%xmm4
unpcklpd %xmm1,%xmm0
subpd  %xmm0,%xmm5
mulpd  %xmm5,%xmm5
addpd  0xed4(%rip),%xmm5
mulpd  %xmm5,%xmm5
movapd 0xed8(%rip),%xmm1
divpd  %xmm5,%xmm1
movapd %xmm1,%xmm2
unpckhpd %xmm1,%xmm2
movapd %xmm1,%xmm5
addsd  %xmm2,%xmm5
movsd  0xea4(%rip),%xmm0
divsd  %xmm5,%xmm0
mulsd  %xmm0,%xmm1
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
mulsd  %xmm4,%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @interp_weno3(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%16 = load double, double* %4
%17 = load double, double* %5
%18 = fmul double 1.500000e+00, %17
%19 = call double @llvm.fmuladd.f64(double -5.000000e-01, double %16, double %18)
store double %19, double* %7
%20 = load double, double* %5
%21 = load double, double* %6
%22 = fmul double 5.000000e-01, %21
%23 = call double @llvm.fmuladd.f64(double 5.000000e-01, double %20, double %22)
store double %23, double* %8
%24 = load double, double* %6
%25 = load double, double* %5
%26 = fsub double %24, %25
%27 = load double, double* %6
%28 = load double, double* %5
%29 = fsub double %27, %28
%30 = fmul double %26, %29
store double %30, double* %9
%31 = load double, double* %5
%32 = load double, double* %4
%33 = fsub double %31, %32
%34 = load double, double* %5
%35 = load double, double* %4
%36 = fsub double %34, %35
%37 = fmul double %33, %36
store double %37, double* %10
%38 = load double, double* %10
%39 = fadd double %38, 1.000000e-10
%40 = load double, double* %10
%41 = fadd double %40, 1.000000e-10
%42 = fmul double %39, %41
%43 = fdiv double 0x3FD5555555555555, %42
store double %43, double* %11
%44 = load double, double* %9
%45 = fadd double %44, 1.000000e-10
%46 = load double, double* %9
%47 = fadd double %46, 1.000000e-10
%48 = fmul double %45, %47
%49 = fdiv double 0x3FE5555555555555, %48
store double %49, double* %12
%50 = load double, double* %11
%51 = load double, double* %12
%52 = fadd double %50, %51
%53 = fdiv double 1.000000e+00, %52
store double %53, double* %13
%54 = load double, double* %11
%55 = load double, double* %13
%56 = fmul double %54, %55
store double %56, double* %14
%57 = load double, double* %12
%58 = load double, double* %13
%59 = fmul double %57, %58
store double %59, double* %15
%60 = load double, double* %14
%61 = load double, double* %7
%62 = load double, double* %15
%63 = load double, double* %8
%64 = fmul double %62, %63
%65 = call double @llvm.fmuladd.f64(double %60, double %61, double %64)
ret double %65
}

LLVM IR (-O2):
define double @interp_weno3(double %0, double %1, double %2) {
%4 = fmul double %1, 1.500000e+00
%5 = tail call double @llvm.fmuladd.f64(double %0, double -5.000000e-01, double %4)
%6 = fmul double %2, 5.000000e-01
%7 = tail call double @llvm.fmuladd.f64(double %1, double 5.000000e-01, double %6)
%8 = insertelement <2 x double> poison, double %1, i64 0
%9 = insertelement <2 x double> %8, double %2, i64 1
%10 = insertelement <2 x double> poison, double %0, i64 0
%11 = insertelement <2 x double> %10, double %1, i64 1
%12 = fsub <2 x double> %9, %11
%13 = fmul <2 x double> %12, %12
%14 = fadd <2 x double> %13, <double 1.000000e-10, double 1.000000e-10>
%15 = fmul <2 x double> %14, %14
%16 = fdiv <2 x double> <double 0x3FD5555555555555, double 0x3FE5555555555555>, %15
%17 = extractelement <2 x double> %16, i64 0
%18 = extractelement <2 x double> %16, i64 1
%19 = fadd double %17, %18
%20 = fdiv double 1.000000e+00, %19
%21 = fmul double %17, %20
%22 = fmul double %18, %20
%23 = fmul double %7, %22
%24 = tail call double @llvm.fmuladd.f64(double %21, double %5, double %23)
ret double %24
}