void doflop(int m, int n, double *x) {
  int i, j;
  double y = 0.1;
  y = 1.1;
  for (j = 0; j < n; j++) {
    for (i = 0; i < m; i++) {
      x[i] += y * x[i];
    }
  }
  if (x[i] == 1.1234) {
    printf("%.3e \n", x);
  }
}


x86 assembly (clang, -O0):
<doflop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
movsd  0xede(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xec9(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11af <doflop+0x9f>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    119c <doflop+0x8c>
movsd  -0x20(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1156 <doflop+0x46>
jmp    11a1 <doflop+0x91>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1143 <doflop+0x33>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  0xe4c(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    11e6 <doflop+0xd6>
jp     11e6 <doflop+0xd6>
mov    -0x10(%rbp),%rsi
lea    0xe39(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<doflop>:
push   %r14
push   %rbx
test   %esi,%esi
jle    1270 <doflop+0x160>
mov    %edi,%eax
mov    %eax,%r11d
and    $0xfffffffc,%r11d
lea    -0x4(%r11),%r8
mov    %r8,%r9
shr    $0x2,%r9
add    $0x1,%r9
mov    %r9,%r10
and    $0xfffffffffffffffe,%r10
xor    %r14d,%r14d
movsd  0xecb(%rip),%xmm0
movapd 0xeb3(%rip),%xmm1
jmp    115d <doflop+0x4d>
nop
add    $0x1,%r14d
cmp    %esi,%r14d
je     1270 <doflop+0x160>
mov    $0x0,%ebx
test   %edi,%edi
jle    1150 <doflop+0x40>
cmp    $0x4,%edi
jae    1180 <doflop+0x70>
xor    %ecx,%ecx
jmp    1240 <doflop+0x130>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
test   %r8,%r8
je     1266 <doflop+0x156>
mov    %r10,%rcx
xor    %ebx,%ebx
xchg   %ax,%ax
movupd (%rdx,%rbx,8),%xmm2
movupd 0x10(%rdx,%rbx,8),%xmm3
movupd 0x20(%rdx,%rbx,8),%xmm4
movupd 0x30(%rdx,%rbx,8),%xmm5
movapd %xmm2,%xmm6
mulpd  %xmm1,%xmm6
addpd  %xmm2,%xmm6
movapd %xmm3,%xmm2
mulpd  %xmm1,%xmm2
addpd  %xmm3,%xmm2
movupd %xmm6,(%rdx,%rbx,8)
movupd %xmm2,0x10(%rdx,%rbx,8)
movapd %xmm4,%xmm2
mulpd  %xmm1,%xmm2
addpd  %xmm4,%xmm2
movapd %xmm5,%xmm3
mulpd  %xmm1,%xmm3
addpd  %xmm5,%xmm3
movupd %xmm2,0x20(%rdx,%rbx,8)
movupd %xmm3,0x30(%rdx,%rbx,8)
add    $0x8,%rbx
add    $0xfffffffffffffffe,%rcx
jne    1190 <doflop+0x80>
test   $0x1,%r9b
je     122c <doflop+0x11c>
movupd (%rdx,%rbx,8),%xmm2
movupd 0x10(%rdx,%rbx,8),%xmm3
movapd %xmm2,%xmm4
mulpd  %xmm1,%xmm4
addpd  %xmm2,%xmm4
movapd %xmm3,%xmm2
mulpd  %xmm1,%xmm2
addpd  %xmm3,%xmm2
movupd %xmm4,(%rdx,%rbx,8)
movupd %xmm2,0x10(%rdx,%rbx,8)
mov    %r11,%rcx
mov    %edi,%ebx
cmp    %rax,%r11
je     1150 <doflop+0x40>
nopw   0x0(%rax,%rax,1)
movsd  (%rdx,%rcx,8),%xmm2
movapd %xmm2,%xmm3
mulsd  %xmm0,%xmm3
addsd  %xmm2,%xmm3
movsd  %xmm3,(%rdx,%rcx,8)
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1240 <doflop+0x130>
mov    %edi,%ebx
jmp    1150 <doflop+0x40>
xor    %ebx,%ebx
test   $0x1,%r9b
jne    11fe <doflop+0xee>
jmp    122c <doflop+0x11c>
movslq %ebx,%rax
movsd  (%rdx,%rax,8),%xmm0
ucomisd 0xd98(%rip),%xmm0
jne    1298 <doflop+0x188>
jp     1298 <doflop+0x188>
lea    0xd95(%rip),%rdi
mov    %rdx,%rsi
xor    %eax,%eax
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%.3e \0A\00"
define void @doflop(i32 %0, i32 %1, double* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca double*
%7 = alloca i32
%8 = alloca i32
%9 = alloca double
store i32 %0, i32* %4
store i32 %1, i32* %5
store double* %2, double** %6
store double 1.000000e-01, double* %9
store double 1.100000e+00, double* %9
store i32 0, i32* %8
br label %10
10: ; preds = %36, %3
%11 = load i32, i32* %8
%12 = load i32, i32* %5
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %39
14: ; preds = %10
store i32 0, i32* %7
br label %15
15: ; preds = %32, %14
%16 = load i32, i32* %7
%17 = load i32, i32* %4
%18 = icmp slt i32 %16, %17
br i1 %18, label %19, label %35
19: ; preds = %15
%20 = load double, double* %9
%21 = load double*, double** %6
%22 = load i32, i32* %7
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds double, double* %21, i64 %23
%25 = load double, double* %24
%26 = load double*, double** %6
%27 = load i32, i32* %7
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds double, double* %26, i64 %28
%30 = load double, double* %29
%31 = call double @llvm.fmuladd.f64(double %20, double %25, double %30)
store double %31, double* %29
br label %32
32: ; preds = %19
%33 = load i32, i32* %7
%34 = add nsw i32 %33, 1
store i32 %34, i32* %7
br label %15
35: ; preds = %15
br label %36
36: ; preds = %35
%37 = load i32, i32* %8
%38 = add nsw i32 %37, 1
store i32 %38, i32* %8
br label %10
39: ; preds = %10
%40 = load double*, double** %6
%41 = load i32, i32* %7
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds double, double* %40, i64 %42
%44 = load double, double* %43
%45 = fcmp oeq double %44, 1.123400e+00
br i1 %45, label %46, label %49
46: ; preds = %39
%47 = load double*, double** %6
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double* %47)
br label %49
49: ; preds = %46, %39
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%.3e \0A\00"
define void @doflop(i32 %0, i32 %1, double* %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %77
5: ; preds = %3
%6 = icmp sgt i32 %0, 0
%7 = zext i32 %0 to i64
%8 = and i64 %7, 4294967292
%9 = add nsw i64 %8, -4
%10 = lshr exact i64 %9, 2
%11 = add nuw nsw i64 %10, 1
%12 = icmp ult i32 %0, 4
%13 = and i64 %7, 4294967292
%14 = and i64 %11, 1
%15 = icmp eq i64 %9, 0
%16 = and i64 %11, 9223372036854775806
%17 = icmp eq i64 %14, 0
%18 = icmp eq i64 %13, %7
br label %19
19: ; preds = %5, %73
%20 = phi i32 [ 0, %5 ], [ %75, %73 ]
br i1 %6, label %21, label %73
21: ; preds = %19
br i1 %12, label %64, label %22
22: ; preds = %21
br i1 %15, label %50, label %23
23: ; preds = %22, %23
%24 = phi i64 [ %47, %23 ], [ 0, %22 ]
%25 = phi i64 [ %48, %23 ], [ 0, %22 ]
%26 = getelementptr inbounds double, double* %2, i64 %24
%27 = bitcast double* %26 to <2 x double>*
%28 = load <2 x double>, <2 x double>* %27
%29 = getelementptr inbounds double, double* %26, i64 2
%30 = bitcast double* %29 to <2 x double>*
%31 = load <2 x double>, <2 x double>* %30
%32 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %28, <2 x double> <double 1.100000e+00, double 1.100000e+00>, <2 x double> %28)
%33 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %31, <2 x double> <double 1.100000e+00, double 1.100000e+00>, <2 x double> %31)
%34 = bitcast double* %26 to <2 x double>*
store <2 x double> %32, <2 x double>* %34
%35 = bitcast double* %29 to <2 x double>*
store <2 x double> %33, <2 x double>* %35
%36 = or i64 %24, 4
%37 = getelementptr inbounds double, double* %2, i64 %36
%38 = bitcast double* %37 to <2 x double>*
%39 = load <2 x double>, <2 x double>* %38
%40 = getelementptr inbounds double, double* %37, i64 2
%41 = bitcast double* %40 to <2 x double>*
%42 = load <2 x double>, <2 x double>* %41
%43 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %39, <2 x double> <double 1.100000e+00, double 1.100000e+00>, <2 x double> %39)
%44 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %42, <2 x double> <double 1.100000e+00, double 1.100000e+00>, <2 x double> %42)
%45 = bitcast double* %37 to <2 x double>*
store <2 x double> %43, <2 x double>* %45
%46 = bitcast double* %40 to <2 x double>*
store <2 x double> %44, <2 x double>* %46
%47 = add nuw i64 %24, 8
%48 = add i64 %25, 2
%49 = icmp eq i64 %48, %16
br i1 %49, label %50, label %23
50: ; preds = %23, %22
%51 = phi i64 [ 0, %22 ], [ %47, %23 ]
br i1 %17, label %63, label %52
52: ; preds = %50
%53 = getelementptr inbounds double, double* %2, i64 %51
%54 = bitcast double* %53 to <2 x double>*
%55 = load <2 x double>, <2 x double>* %54
%56 = getelementptr inbounds double, double* %53, i64 2
%57 = bitcast double* %56 to <2 x double>*
%58 = load <2 x double>, <2 x double>* %57
%59 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %55, <2 x double> <double 1.100000e+00, double 1.100000e+00>, <2 x double> %55)
%60 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %58, <2 x double> <double 1.100000e+00, double 1.100000e+00>, <2 x double> %58)
%61 = bitcast double* %53 to <2 x double>*
store <2 x double> %59, <2 x double>* %61
%62 = bitcast double* %56 to <2 x double>*
store <2 x double> %60, <2 x double>* %62
br label %63
63: ; preds = %50, %52
br i1 %18, label %73, label %64
64: ; preds = %21, %63
%65 = phi i64 [ 0, %21 ], [ %13, %63 ]
br label %66
66: ; preds = %64, %66
%67 = phi i64 [ %71, %66 ], [ %65, %64 ]
%68 = getelementptr inbounds double, double* %2, i64 %67
%69 = load double, double* %68
%70 = tail call double @llvm.fmuladd.f64(double %69, double 1.100000e+00, double %69)
store double %70, double* %68
%71 = add nuw nsw i64 %67, 1
%72 = icmp eq i64 %71, %7
br i1 %72, label %73, label %66
73: ; preds = %66, %63, %19
%74 = phi i32 [ 0, %19 ], [ %0, %63 ], [ %0, %66 ]
%75 = add nuw nsw i32 %20, 1
%76 = icmp eq i32 %75, %1
br i1 %76, label %77, label %19
77: ; preds = %73, %3
%78 = phi i32 [ undef, %3 ], [ %74, %73 ]
%79 = sext i32 %78 to i64
%80 = getelementptr inbounds double, double* %2, i64 %79
%81 = load double, double* %80
%82 = fcmp oeq double %81, 1.123400e+00
br i1 %82, label %83, label %85
83: ; preds = %77
%84 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double* %2)
br label %85
85: ; preds = %83, %77
ret void
}