__attribute__((optimize("no-unroll-loops"))) float loop(int zero) {
  float t1 = 1.1f;
  float t2 = 89.0f;
  float t3 = 3.2f;
  float t4 = 21.0f;
  float t5 = 2.0f;
  float t6 = 7.0f;
  float t7 = 2.5f;
  float t8 = 3.0f;
  int i;
  for (i = 0; i < 4096; i += 1) {
    t1 *= 0.2f;
    t2 *= 0.4f;
    t3 *= 1.2f;
    t4 *= 0.12f;
    t5 *= 0.13f;
    t6 *= 0.14f;
    t7 *= 0.15f;
    t8 *= 0.16f;
  }
  return t1 + t2 + t3 + t4 + t5 + t6 + t7 + t8;
}


x86 assembly (clang, -O0):
<loop>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movss  0xf0d(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xefc(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xeeb(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xeda(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xec9(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  0xeb8(%rip),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  0xea7(%rip),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  0xe96(%rip),%xmm0
movss  %xmm0,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
cmpl   $0x1000,-0x28(%rbp)
jge    1221 <loop+0x121>
movss  0xeb1(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xe9b(%rip),%xmm0
mulss  -0xc(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xe85(%rip),%xmm0
mulss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xe6f(%rip),%xmm0
mulss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xe59(%rip),%xmm0
mulss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  0xe43(%rip),%xmm0
mulss  -0x1c(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  0xe2d(%rip),%xmm0
mulss  -0x20(%rbp),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  0xe17(%rip),%xmm0
mulss  -0x24(%rbp),%xmm0
movss  %xmm0,-0x24(%rbp)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1176 <loop+0x76>
movss  -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
addss  -0x10(%rbp),%xmm0
addss  -0x14(%rbp),%xmm0
addss  -0x18(%rbp),%xmm0
addss  -0x1c(%rbp),%xmm0
addss  -0x20(%rbp),%xmm0
addss  -0x24(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<loop>:
movaps 0xef9(%rip),%xmm0
movaps 0xf02(%rip),%xmm1
mov    $0x1000,%eax
movaps 0xf06(%rip),%xmm2
movaps 0xf0f(%rip),%xmm3
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mulps  %xmm2,%xmm0
mulps  %xmm3,%xmm1
mulps  %xmm3,%xmm1
mulps  %xmm2,%xmm0
mulps  %xmm2,%xmm0
mulps  %xmm3,%xmm1
mulps  %xmm3,%xmm1
mulps  %xmm2,%xmm0
mulps  %xmm2,%xmm0
mulps  %xmm3,%xmm1
mulps  %xmm3,%xmm1
mulps  %xmm2,%xmm0
mulps  %xmm2,%xmm0
mulps  %xmm3,%xmm1
mulps  %xmm3,%xmm1
mulps  %xmm2,%xmm0
add    $0xfffffff8,%eax
jne    1130 <loop+0x30>
movaps %xmm0,%xmm2
unpckhpd %xmm0,%xmm2
movaps %xmm0,%xmm3
shufps $0xff,%xmm0,%xmm3
addss  %xmm2,%xmm3
movaps %xmm0,%xmm2
shufps $0x55,%xmm0,%xmm2
addss  %xmm3,%xmm2
addss  %xmm0,%xmm2
movaps %xmm1,%xmm0
shufps $0xff,%xmm1,%xmm0
addss  %xmm2,%xmm0
movaps %xmm1,%xmm2
unpckhpd %xmm1,%xmm2
addss  %xmm0,%xmm2
movaps %xmm1,%xmm0
shufps $0x55,%xmm1,%xmm0
addss  %xmm2,%xmm0
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @loop(i32 %0) {
%2 = alloca i32
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca i32
store i32 %0, i32* %2
store float 0x3FF19999A0000000, float* %3
store float 8.900000e+01, float* %4
store float 0x40099999A0000000, float* %5
store float 2.100000e+01, float* %6
store float 2.000000e+00, float* %7
store float 7.000000e+00, float* %8
store float 2.500000e+00, float* %9
store float 3.000000e+00, float* %10
store i32 0, i32* %11
br label %12
12: ; preds = %32, %1
%13 = load i32, i32* %11
%14 = icmp slt i32 %13, 4096
br i1 %14, label %15, label %35
15: ; preds = %12
%16 = load float, float* %3
%17 = fmul float %16, 0x3FC99999A0000000
store float %17, float* %3
%18 = load float, float* %4
%19 = fmul float %18, 0x3FD99999A0000000
store float %19, float* %4
%20 = load float, float* %5
%21 = fmul float %20, 0x3FF3333340000000
store float %21, float* %5
%22 = load float, float* %6
%23 = fmul float %22, 0x3FBEB851E0000000
store float %23, float* %6
%24 = load float, float* %7
%25 = fmul float %24, 0x3FC0A3D700000000
store float %25, float* %7
%26 = load float, float* %8
%27 = fmul float %26, 0x3FC1EB8520000000
store float %27, float* %8
%28 = load float, float* %9
%29 = fmul float %28, 0x3FC3333340000000
store float %29, float* %9
%30 = load float, float* %10
%31 = fmul float %30, 0x3FC47AE140000000
store float %31, float* %10
br label %32
32: ; preds = %15
%33 = load i32, i32* %11
%34 = add nsw i32 %33, 1
store i32 %34, i32* %11
br label %12
35: ; preds = %12
%36 = load float, float* %3
%37 = load float, float* %4
%38 = fadd float %36, %37
%39 = load float, float* %5
%40 = fadd float %38, %39
%41 = load float, float* %6
%42 = fadd float %40, %41
%43 = load float, float* %7
%44 = fadd float %42, %43
%45 = load float, float* %8
%46 = fadd float %44, %45
%47 = load float, float* %9
%48 = fadd float %46, %47
%49 = load float, float* %10
%50 = fadd float %48, %49
ret float %50
}

LLVM IR (-O2):
define float @loop(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 0, %1 ], [ %13, %2 ]
%4 = phi <8 x float> [ <float 3.000000e+00, float 2.500000e+00, float 7.000000e+00, float 2.000000e+00, float 2.100000e+01, float 0x40099999A0000000, float 8.900000e+01, float 0x3FF19999A0000000>, %1 ], [ %12, %2 ]
%5 = fmul <8 x float> %4, <float 0x3FC47AE140000000, float 0x3FC3333340000000, float 0x3FC1EB8520000000, float 0x3FC0A3D700000000, float 0x3FBEB851E0000000, float 0x3FF3333340000000, float 0x3FD99999A0000000, float 0x3FC99999A0000000>
%6 = fmul <8 x float> %5, <float 0x3FC47AE140000000, float 0x3FC3333340000000, float 0x3FC1EB8520000000, float 0x3FC0A3D700000000, float 0x3FBEB851E0000000, float 0x3FF3333340000000, float 0x3FD99999A0000000, float 0x3FC99999A0000000>
%7 = fmul <8 x float> %6, <float 0x3FC47AE140000000, float 0x3FC3333340000000, float 0x3FC1EB8520000000, float 0x3FC0A3D700000000, float 0x3FBEB851E0000000, float 0x3FF3333340000000, float 0x3FD99999A0000000, float 0x3FC99999A0000000>
%8 = fmul <8 x float> %7, <float 0x3FC47AE140000000, float 0x3FC3333340000000, float 0x3FC1EB8520000000, float 0x3FC0A3D700000000, float 0x3FBEB851E0000000, float 0x3FF3333340000000, float 0x3FD99999A0000000, float 0x3FC99999A0000000>
%9 = fmul <8 x float> %8, <float 0x3FC47AE140000000, float 0x3FC3333340000000, float 0x3FC1EB8520000000, float 0x3FC0A3D700000000, float 0x3FBEB851E0000000, float 0x3FF3333340000000, float 0x3FD99999A0000000, float 0x3FC99999A0000000>
%10 = fmul <8 x float> %9, <float 0x3FC47AE140000000, float 0x3FC3333340000000, float 0x3FC1EB8520000000, float 0x3FC0A3D700000000, float 0x3FBEB851E0000000, float 0x3FF3333340000000, float 0x3FD99999A0000000, float 0x3FC99999A0000000>
%11 = fmul <8 x float> %10, <float 0x3FC47AE140000000, float 0x3FC3333340000000, float 0x3FC1EB8520000000, float 0x3FC0A3D700000000, float 0x3FBEB851E0000000, float 0x3FF3333340000000, float 0x3FD99999A0000000, float 0x3FC99999A0000000>
%12 = fmul <8 x float> %11, <float 0x3FC47AE140000000, float 0x3FC3333340000000, float 0x3FC1EB8520000000, float 0x3FC0A3D700000000, float 0x3FBEB851E0000000, float 0x3FF3333340000000, float 0x3FD99999A0000000, float 0x3FC99999A0000000>
%13 = add nuw nsw i32 %3, 8
%14 = icmp eq i32 %13, 4096
br i1 %14, label %15, label %2
15: ; preds = %2
%16 = extractelement <8 x float> %12, i64 6
%17 = extractelement <8 x float> %12, i64 7
%18 = fadd float %17, %16
%19 = extractelement <8 x float> %12, i64 5
%20 = fadd float %18, %19
%21 = extractelement <8 x float> %12, i64 4
%22 = fadd float %20, %21
%23 = extractelement <8 x float> %12, i64 3
%24 = fadd float %22, %23
%25 = extractelement <8 x float> %12, i64 2
%26 = fadd float %24, %25
%27 = extractelement <8 x float> %12, i64 1
%28 = fadd float %26, %27
%29 = extractelement <8 x float> %12, i64 0
%30 = fadd float %28, %29
ret float %30
}