double compute_e(double r1) {
  double r2 = r1 / 2;
  double r3 = r2 / 3;
  double r4 = r3 / 4;
  double r5 = r4 / 5;
  double r6 = r5 / 6;
  double r7 = r6 / 7;
  double r8 = r7 / 8;
  double r9 = r8 / 9;
  double r10 = r9 / 10;
  double r11 = r10 / 11;
  double r12 = r11 / 12;
  double r13 = r12 / 13;
  double r14 = r13 / 14;
  double r15 = r14 / 15;
  double r16 = r15 / 16;
  double r17 = r16 / 17;
  double r18 = r17 / 18;
  double r19 = r18 / 19;
  double r20 = r19 / 20;
  double e = r20 + r19;
  e += r18 + r17;
  e += r16 + r15;
  e += r14 + r13;
  e += r12 + r11;
  e += r10 + r9;
  e += r8 + r7;
  e += r6 + r5;
  e += r4 + r3;
  e += r2 + 2;
  return e;
}


x86 assembly (clang, -O0):
<compute_e>:
push   %rbp
mov    %rsp,%rbp
sub    $0x28,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xee6(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xf60(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xf42(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xf24(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  0xf06(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  0xee8(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  0xeca(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  0xeac(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  0xe8e(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  0xe70(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  0xe52(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  0xe34(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm0
movsd  0xe16(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
movsd  0xdf8(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
movsd  0xdda(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x80(%rbp),%xmm0
movsd  0xdbc(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
movsd  0xd98(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
movsd  0xd74(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
movsd  0xd50(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
addsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
addsd  -0x88(%rbp),%xmm0
ff
addsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
addsd  -0x78(%rbp),%xmm0
addsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
addsd  -0x68(%rbp),%xmm0
addsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x60(%rbp),%xmm0
addsd  -0x58(%rbp),%xmm0
addsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
addsd  -0x48(%rbp),%xmm0
addsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
addsd  -0x38(%rbp),%xmm0
addsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
addsd  -0x28(%rbp),%xmm0
addsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
addsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  0xc46(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
addsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
add    $0x28,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compute_e>:
movapd %xmm0,%xmm8
mulsd  0xef2(%rip),%xmm8
movapd %xmm8,%xmm0
divsd  0xeed(%rip),%xmm0
movsd  %xmm0,-0x8(%rsp)
movsd  0xee6(%rip),%xmm13
mulsd  %xmm0,%xmm13
movapd %xmm13,%xmm15
divsd  0xedb(%rip),%xmm15
movsd  %xmm15,-0x10(%rsp)
divsd  0xed3(%rip),%xmm15
movapd %xmm15,%xmm10
divsd  0xecd(%rip),%xmm10
movsd  0xecd(%rip),%xmm5
mulsd  %xmm10,%xmm5
movapd %xmm5,%xmm11
divsd  0xec2(%rip),%xmm11
movapd %xmm11,%xmm7
divsd  0xebd(%rip),%xmm7
movapd %xmm7,%xmm9
divsd  0xeb7(%rip),%xmm9
movapd %xmm9,%xmm12
divsd  0xeb1(%rip),%xmm12
movapd %xmm12,%xmm14
divsd  0xeab(%rip),%xmm14
movapd %xmm14,%xmm2
divsd  0xea6(%rip),%xmm2
movapd %xmm2,%xmm4
divsd  0xea2(%rip),%xmm4
movsd  0xea2(%rip),%xmm3
mulsd  %xmm4,%xmm3
addsd  %xmm3,%xmm4
divsd  0xe9a(%rip),%xmm3
movapd %xmm3,%xmm6
divsd  0xe96(%rip),%xmm6
movapd %xmm6,%xmm1
divsd  0xe92(%rip),%xmm1
movapd %xmm1,%xmm0
divsd  0xe8e(%rip),%xmm0
addsd  %xmm1,%xmm0
addsd  %xmm3,%xmm6
addsd  %xmm0,%xmm6
addsd  %xmm4,%xmm6
addsd  %xmm14,%xmm2
addsd  %xmm6,%xmm2
addsd  %xmm9,%xmm12
addsd  %xmm2,%xmm12
addsd  %xmm11,%xmm7
addsd  %xmm12,%xmm7
addsd  %xmm10,%xmm5
addsd  %xmm7,%xmm5
addsd  -0x10(%rsp),%xmm15
addsd  %xmm5,%xmm15
addsd  -0x8(%rsp),%xmm13
addsd  %xmm15,%xmm13
addsd  0xe3f(%rip),%xmm8
addsd  %xmm13,%xmm8
movapd %xmm8,%xmm0
ret

LLVM IR (-O0):
define double @compute_e(double %0) {
%2 = alloca double
%3 = alloca double
%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
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca double
store double %0, double* %2
%23 = load double, double* %2
%24 = fdiv double %23, 2.000000e+00
store double %24, double* %3
%25 = load double, double* %3
%26 = fdiv double %25, 3.000000e+00
store double %26, double* %4
%27 = load double, double* %4
%28 = fdiv double %27, 4.000000e+00
store double %28, double* %5
%29 = load double, double* %5
%30 = fdiv double %29, 5.000000e+00
store double %30, double* %6
%31 = load double, double* %6
%32 = fdiv double %31, 6.000000e+00
store double %32, double* %7
%33 = load double, double* %7
%34 = fdiv double %33, 7.000000e+00
store double %34, double* %8
%35 = load double, double* %8
%36 = fdiv double %35, 8.000000e+00
store double %36, double* %9
%37 = load double, double* %9
%38 = fdiv double %37, 9.000000e+00
store double %38, double* %10
%39 = load double, double* %10
%40 = fdiv double %39, 1.000000e+01
store double %40, double* %11
%41 = load double, double* %11
%42 = fdiv double %41, 1.100000e+01
store double %42, double* %12
%43 = load double, double* %12
%44 = fdiv double %43, 1.200000e+01
store double %44, double* %13
%45 = load double, double* %13
%46 = fdiv double %45, 1.300000e+01
store double %46, double* %14
%47 = load double, double* %14
%48 = fdiv double %47, 1.400000e+01
store double %48, double* %15
%49 = load double, double* %15
%50 = fdiv double %49, 1.500000e+01
store double %50, double* %16
%51 = load double, double* %16
%52 = fdiv double %51, 1.600000e+01
store double %52, double* %17
%53 = load double, double* %17
%54 = fdiv double %53, 1.700000e+01
store double %54, double* %18
%55 = load double, double* %18
%56 = fdiv double %55, 1.800000e+01
store double %56, double* %19
%57 = load double, double* %19
%58 = fdiv double %57, 1.900000e+01
store double %58, double* %20
%59 = load double, double* %20
%60 = fdiv double %59, 2.000000e+01
store double %60, double* %21
%61 = load double, double* %21
%62 = load double, double* %20
%63 = fadd double %61, %62
store double %63, double* %22
%64 = load double, double* %19
%65 = load double, double* %18
%66 = fadd double %64, %65
%67 = load double, double* %22
%68 = fadd double %67, %66
store double %68, double* %22
%69 = load double, double* %17
%70 = load double, double* %16
%71 = fadd double %69, %70
%72 = load double, double* %22
%73 = fadd double %72, %71
store double %73, double* %22
%74 = load double, double* %15
%75 = load double, double* %14
%76 = fadd double %74, %75
%77 = load double, double* %22
%78 = fadd double %77, %76
store double %78, double* %22
%79 = load double, double* %13
%80 = load double, double* %12
%81 = fadd double %79, %80
%82 = load double, double* %22
%83 = fadd double %82, %81
store double %83, double* %22
%84 = load double, double* %11
%85 = load double, double* %10
%86 = fadd double %84, %85
%87 = load double, double* %22
%88 = fadd double %87, %86
store double %88, double* %22
%89 = load double, double* %9
%90 = load double, double* %8
%91 = fadd double %89, %90
%92 = load double, double* %22
%93 = fadd double %92, %91
store double %93, double* %22
%94 = load double, double* %7
%95 = load double, double* %6
%96 = fadd double %94, %95
%97 = load double, double* %22
%98 = fadd double %97, %96
store double %98, double* %22
%99 = load double, double* %5
%100 = load double, double* %4
%101 = fadd double %99, %100
%102 = load double, double* %22
%103 = fadd double %102, %101
store double %103, double* %22
%104 = load double, double* %3
%105 = fadd double %104, 2.000000e+00
%106 = load double, double* %22
%107 = fadd double %106, %105
store double %107, double* %22
%108 = load double, double* %22
ret double %108
}

LLVM IR (-O2):
define double @compute_e(double %0) {
%2 = fmul double %0, 5.000000e-01
%3 = fdiv double %2, 3.000000e+00
%4 = fmul double %3, 2.500000e-01
%5 = fdiv double %4, 5.000000e+00
%6 = fdiv double %5, 6.000000e+00
%7 = fdiv double %6, 7.000000e+00
%8 = fmul double %7, 1.250000e-01
%9 = fdiv double %8, 9.000000e+00
%10 = fdiv double %9, 1.000000e+01
%11 = fdiv double %10, 1.100000e+01
%12 = fdiv double %11, 1.200000e+01
%13 = fdiv double %12, 1.300000e+01
%14 = fdiv double %13, 1.400000e+01
%15 = fdiv double %14, 1.500000e+01
%16 = fmul double %15, 6.250000e-02
%17 = fdiv double %16, 1.700000e+01
%18 = fdiv double %17, 1.800000e+01
%19 = fdiv double %18, 1.900000e+01
%20 = fdiv double %19, 2.000000e+01
%21 = fadd double %19, %20
%22 = fadd double %17, %18
%23 = fadd double %22, %21
%24 = fadd double %15, %16
%25 = fadd double %24, %23
%26 = fadd double %13, %14
%27 = fadd double %26, %25
%28 = fadd double %11, %12
%29 = fadd double %28, %27
%30 = fadd double %9, %10
%31 = fadd double %30, %29
%32 = fadd double %7, %8
%33 = fadd double %32, %31
%34 = fadd double %5, %6
%35 = fadd double %34, %33
%36 = fadd double %3, %4
%37 = fadd double %36, %35
%38 = fadd double %2, 2.000000e+00
%39 = fadd double %38, %37
ret double %39
}