double eval_pol20(double c[20], double x, double y, double z) {
  double col = y;
  double lig = x;
  double alt = z;
  double m[20] = {1,
                  lig,
                  col,
                  alt,
                  lig * col,
                  lig * alt,
                  col * alt,
                  lig * lig,
                  col * col,
                  alt * alt,
                  col * lig * alt,
                  lig * lig * lig,
                  lig * col * col,
                  lig * alt * alt,
                  lig * lig * col,
                  col * col * col,
                  col * alt * alt,
                  lig * lig * alt,
                  col * col * alt,
                  alt * alt * alt};
  double r = 0;
  for (int i = 0; i < 20; i++)
    r += c[i] * m[i];
  return r;
}


x86 assembly (clang, -O0):
<eval_pol20>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xebf(%rip),%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x30(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x30(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x28(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x28(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x30(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x28(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x38(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movl   $0x0,-0xec(%rbp)
cmpl   $0x14,-0xec(%rbp)
jge    1318 <eval_pol20+0x218>
mov    -0x8(%rbp),%rax
movslq -0xec(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0xec(%rbp),%rax
movsd  -0xe0(%rbp,%rax,8),%xmm2
ff ff
movsd  -0xe8(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
mov    -0xec(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xec(%rbp)
jmp    12bf <eval_pol20+0x1bf>
movsd  -0xe8(%rbp),%xmm0
ff
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eval_pol20>:
movapd %xmm0,%xmm4
mulsd  %xmm1,%xmm4
movapd %xmm0,%xmm11
mulsd  %xmm2,%xmm11
movapd %xmm1,%xmm5
mulsd  %xmm2,%xmm5
movapd %xmm0,%xmm12
mulsd  %xmm0,%xmm12
movapd %xmm1,%xmm3
mulsd  %xmm1,%xmm3
movapd %xmm2,%xmm7
mulsd  %xmm2,%xmm7
movapd %xmm4,%xmm8
mulsd  %xmm2,%xmm8
movapd %xmm12,%xmm9
mulsd  %xmm0,%xmm9
movapd %xmm4,%xmm6
mulsd  %xmm1,%xmm6
movsd  %xmm6,-0x8(%rsp)
movapd %xmm11,%xmm10
mulsd  %xmm2,%xmm10
movapd %xmm12,%xmm6
mulsd  %xmm1,%xmm6
movapd %xmm3,%xmm14
xorpd  %xmm13,%xmm13
addsd  (%rdi),%xmm13
mulsd  0x8(%rdi),%xmm0
mulsd  %xmm1,%xmm14
movsd  %xmm14,-0x10(%rsp)
addsd  %xmm13,%xmm0
movapd %xmm5,%xmm15
mulsd  0x10(%rdi),%xmm1
mulsd  %xmm2,%xmm15
addsd  %xmm1,%xmm0
movapd %xmm12,%xmm1
mulsd  %xmm2,%xmm1
movapd %xmm3,%xmm14
mulsd  %xmm2,%xmm14
movapd %xmm7,%xmm13
mulsd  %xmm2,%xmm13
mulsd  0x18(%rdi),%xmm2
addsd  %xmm2,%xmm0
mulsd  0x20(%rdi),%xmm4
mulsd  0x28(%rdi),%xmm11
addsd  %xmm4,%xmm0
addsd  %xmm11,%xmm0
mulsd  0x30(%rdi),%xmm5
addsd  %xmm5,%xmm0
mulsd  0x38(%rdi),%xmm12
addsd  %xmm12,%xmm0
mulsd  0x40(%rdi),%xmm3
mulsd  0x48(%rdi),%xmm7
addsd  %xmm3,%xmm0
addsd  %xmm7,%xmm0
mulsd  0x50(%rdi),%xmm8
addsd  %xmm8,%xmm0
mulsd  0x58(%rdi),%xmm9
addsd  %xmm9,%xmm0
movsd  -0x8(%rsp),%xmm2
mulsd  0x60(%rdi),%xmm2
mulsd  0x68(%rdi),%xmm10
addsd  %xmm2,%xmm0
addsd  %xmm10,%xmm0
mulsd  0x70(%rdi),%xmm6
addsd  %xmm6,%xmm0
movsd  -0x10(%rsp),%xmm2
mulsd  0x78(%rdi),%xmm2
addsd  %xmm2,%xmm0
mulsd  0x80(%rdi),%xmm15
mulsd  0x88(%rdi),%xmm1
addsd  %xmm15,%xmm0
addsd  %xmm1,%xmm0
mulsd  0x90(%rdi),%xmm14
addsd  %xmm14,%xmm0
mulsd  0x98(%rdi),%xmm13
addsd  %xmm13,%xmm0
ret

LLVM IR (-O0):
define double @eval_pol20(double* %0, double %1, double %2, double %3) {
%5 = alloca double*
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca [20 x double]
%13 = alloca double
%14 = alloca i32
store double* %0, double** %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%15 = load double, double* %7
store double %15, double* %9
%16 = load double, double* %6
store double %16, double* %10
%17 = load double, double* %8
store double %17, double* %11
%18 = getelementptr inbounds [20 x double], [20 x double]* %12, i64 0, i64 0
store double 1.000000e+00, double* %18
%19 = getelementptr inbounds double, double* %18, i64 1
%20 = load double, double* %10
store double %20, double* %19
%21 = getelementptr inbounds double, double* %19, i64 1
%22 = load double, double* %9
store double %22, double* %21
%23 = getelementptr inbounds double, double* %21, i64 1
%24 = load double, double* %11
store double %24, double* %23
%25 = getelementptr inbounds double, double* %23, i64 1
%26 = load double, double* %10
%27 = load double, double* %9
%28 = fmul double %26, %27
store double %28, double* %25
%29 = getelementptr inbounds double, double* %25, i64 1
%30 = load double, double* %10
%31 = load double, double* %11
%32 = fmul double %30, %31
store double %32, double* %29
%33 = getelementptr inbounds double, double* %29, i64 1
%34 = load double, double* %9
%35 = load double, double* %11
%36 = fmul double %34, %35
store double %36, double* %33
%37 = getelementptr inbounds double, double* %33, i64 1
%38 = load double, double* %10
%39 = load double, double* %10
%40 = fmul double %38, %39
store double %40, double* %37
%41 = getelementptr inbounds double, double* %37, i64 1
%42 = load double, double* %9
%43 = load double, double* %9
%44 = fmul double %42, %43
store double %44, double* %41
%45 = getelementptr inbounds double, double* %41, i64 1
%46 = load double, double* %11
%47 = load double, double* %11
%48 = fmul double %46, %47
store double %48, double* %45
%49 = getelementptr inbounds double, double* %45, i64 1
%50 = load double, double* %9
%51 = load double, double* %10
%52 = fmul double %50, %51
%53 = load double, double* %11
%54 = fmul double %52, %53
store double %54, double* %49
%55 = getelementptr inbounds double, double* %49, i64 1
%56 = load double, double* %10
%57 = load double, double* %10
%58 = fmul double %56, %57
%59 = load double, double* %10
%60 = fmul double %58, %59
store double %60, double* %55
%61 = getelementptr inbounds double, double* %55, i64 1
%62 = load double, double* %10
%63 = load double, double* %9
%64 = fmul double %62, %63
%65 = load double, double* %9
%66 = fmul double %64, %65
store double %66, double* %61
%67 = getelementptr inbounds double, double* %61, i64 1
%68 = load double, double* %10
%69 = load double, double* %11
%70 = fmul double %68, %69
%71 = load double, double* %11
%72 = fmul double %70, %71
store double %72, double* %67
%73 = getelementptr inbounds double, double* %67, i64 1
%74 = load double, double* %10
%75 = load double, double* %10
%76 = fmul double %74, %75
%77 = load double, double* %9
%78 = fmul double %76, %77
store double %78, double* %73
%79 = getelementptr inbounds double, double* %73, i64 1
%80 = load double, double* %9
%81 = load double, double* %9
%82 = fmul double %80, %81
%83 = load double, double* %9
%84 = fmul double %82, %83
store double %84, double* %79
%85 = getelementptr inbounds double, double* %79, i64 1
%86 = load double, double* %9
%87 = load double, double* %11
%88 = fmul double %86, %87
%89 = load double, double* %11
%90 = fmul double %88, %89
store double %90, double* %85
%91 = getelementptr inbounds double, double* %85, i64 1
%92 = load double, double* %10
%93 = load double, double* %10
%94 = fmul double %92, %93
%95 = load double, double* %11
%96 = fmul double %94, %95
store double %96, double* %91
%97 = getelementptr inbounds double, double* %91, i64 1
%98 = load double, double* %9
%99 = load double, double* %9
%100 = fmul double %98, %99
%101 = load double, double* %11
%102 = fmul double %100, %101
store double %102, double* %97
%103 = getelementptr inbounds double, double* %97, i64 1
%104 = load double, double* %11
%105 = load double, double* %11
%106 = fmul double %104, %105
%107 = load double, double* %11
%108 = fmul double %106, %107
store double %108, double* %103
store double 0.000000e+00, double* %13
store i32 0, i32* %14
br label %109
109: ; preds = %124, %4
%110 = load i32, i32* %14
%111 = icmp slt i32 %110, 20
br i1 %111, label %112, label %127
112: ; preds = %109
%113 = load double*, double** %5
%114 = load i32, i32* %14
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds double, double* %113, i64 %115
%117 = load double, double* %116
%118 = load i32, i32* %14
%119 = sext i32 %118 to i64
%120 = getelementptr inbounds [20 x double], [20 x double]* %12, i64 0, i64 %119
%121 = load double, double* %120
%122 = load double, double* %13
%123 = call double @llvm.fmuladd.f64(double %117, double %121, double %122)
store double %123, double* %13
br label %124
124: ; preds = %112
%125 = load i32, i32* %14
%126 = add nsw i32 %125, 1
store i32 %126, i32* %14
br label %109
127: ; preds = %109
%128 = load double, double* %13
ret double %128
}

LLVM IR (-O2):
define double @eval_pol20(double* nocapture %0, double %1, double %2, double %3) {
%5 = fmul double %1, %2
%6 = fmul double %1, %3
%7 = fmul double %2, %3
%8 = fmul double %1, %1
%9 = fmul double %2, %2
%10 = fmul double %3, %3
%11 = fmul double %5, %3
%12 = fmul double %8, %1
%13 = fmul double %5, %2
%14 = fmul double %6, %3
%15 = fmul double %8, %2
%16 = fmul double %9, %2
%17 = fmul double %7, %3
%18 = fmul double %8, %3
%19 = fmul double %9, %3
%20 = fmul double %10, %3
%21 = load double, double* %0
%22 = fadd double %21, 0.000000e+00
%23 = getelementptr inbounds double, double* %0, i64 1
%24 = load double, double* %23
%25 = tail call double @llvm.fmuladd.f64(double %24, double %1, double %22)
%26 = getelementptr inbounds double, double* %0, i64 2
%27 = load double, double* %26
%28 = tail call double @llvm.fmuladd.f64(double %27, double %2, double %25)
%29 = getelementptr inbounds double, double* %0, i64 3
%30 = load double, double* %29
%31 = tail call double @llvm.fmuladd.f64(double %30, double %3, double %28)
%32 = getelementptr inbounds double, double* %0, i64 4
%33 = load double, double* %32
%34 = tail call double @llvm.fmuladd.f64(double %33, double %5, double %31)
%35 = getelementptr inbounds double, double* %0, i64 5
%36 = load double, double* %35
%37 = tail call double @llvm.fmuladd.f64(double %36, double %6, double %34)
%38 = getelementptr inbounds double, double* %0, i64 6
%39 = load double, double* %38
%40 = tail call double @llvm.fmuladd.f64(double %39, double %7, double %37)
%41 = getelementptr inbounds double, double* %0, i64 7
%42 = load double, double* %41
%43 = tail call double @llvm.fmuladd.f64(double %42, double %8, double %40)
%44 = getelementptr inbounds double, double* %0, i64 8
%45 = load double, double* %44
%46 = tail call double @llvm.fmuladd.f64(double %45, double %9, double %43)
%47 = getelementptr inbounds double, double* %0, i64 9
%48 = load double, double* %47
%49 = tail call double @llvm.fmuladd.f64(double %48, double %10, double %46)
%50 = getelementptr inbounds double, double* %0, i64 10
%51 = load double, double* %50
%52 = tail call double @llvm.fmuladd.f64(double %51, double %11, double %49)
%53 = getelementptr inbounds double, double* %0, i64 11
%54 = load double, double* %53
%55 = tail call double @llvm.fmuladd.f64(double %54, double %12, double %52)
%56 = getelementptr inbounds double, double* %0, i64 12
%57 = load double, double* %56
%58 = tail call double @llvm.fmuladd.f64(double %57, double %13, double %55)
%59 = getelementptr inbounds double, double* %0, i64 13
%60 = load double, double* %59
%61 = tail call double @llvm.fmuladd.f64(double %60, double %14, double %58)
%62 = getelementptr inbounds double, double* %0, i64 14
%63 = load double, double* %62
%64 = tail call double @llvm.fmuladd.f64(double %63, double %15, double %61)
%65 = getelementptr inbounds double, double* %0, i64 15
%66 = load double, double* %65
%67 = tail call double @llvm.fmuladd.f64(double %66, double %16, double %64)
%68 = getelementptr inbounds double, double* %0, i64 16
%69 = load double, double* %68
%70 = tail call double @llvm.fmuladd.f64(double %69, double %17, double %67)
%71 = getelementptr inbounds double, double* %0, i64 17
%72 = load double, double* %71
%73 = tail call double @llvm.fmuladd.f64(double %72, double %18, double %70)
%74 = getelementptr inbounds double, double* %0, i64 18
%75 = load double, double* %74
%76 = tail call double @llvm.fmuladd.f64(double %75, double %19, double %73)
%77 = getelementptr inbounds double, double* %0, i64 19
%78 = load double, double* %77
%79 = tail call double @llvm.fmuladd.f64(double %78, double %20, double %76)
ret double %79
}