void daxpy_vec(double *Y, const double *X, double alpha, double beta, int incX,
               int incY, int N) {
  register int i;
  register double *y0;
  register const double *x0;
  if (beta != 1.0) {
    y0 = Y;
    if (beta == 0.0) {
      for (i = 0; i < N; i++) {
        y0[0] = 0.0;
        y0++;
      }
    } else {
      for (i = 0; i < N; i++) {
        y0[0] *= beta;
        y0++;
      }
    }
  }
  y0 = Y;
  x0 = X;
  for (i = 0; i < N - 3; i += 4) {
    y0[0] += alpha * x0[0];
    x0 += incX;
    y0 += incY;
    y0[0] += alpha * x0[0];
    x0 += incX;
    y0 += incY;
    y0[0] += alpha * x0[0];
    x0 += incX;
    y0 += incY;
    y0[0] += alpha * x0[0];
    x0 += incX;
    y0 += incY;
  }
  if (i == N) {
    return;
  }
  if (i < N - 1) {
    y0[0] += alpha * x0[0];
    x0 += incX;
    y0 += incY;
    y0[0] += alpha * x0[0];
    x0 += incX;
    y0 += incY;
    i += 2;
  }
  if (i < N) {
    y0[0] += alpha * x0[0];
  }
  return;
}


x86 assembly (clang, -O0):
<daxpy_vec>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
mov    %edx,-0x24(%rbp)
mov    %ecx,-0x28(%rbp)
mov    %r8d,-0x2c(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xed3(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    1142 <daxpy_vec+0x42>
jp     1142 <daxpy_vec+0x42>
jmp    11e7 <daxpy_vec+0xe7>
mov    -0x8(%rbp),%rax
mov    %rax,-0x38(%rbp)
movsd  -0x20(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    119f <daxpy_vec+0x9f>
jp     119f <daxpy_vec+0x9f>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    119a <daxpy_vec+0x9a>
mov    -0x38(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x38(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x38(%rbp)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1169 <daxpy_vec+0x69>
jmp    11e2 <daxpy_vec+0xe2>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    11dd <daxpy_vec+0xdd>
movsd  -0x20(%rbp),%xmm0
mov    -0x38(%rbp),%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
mov    -0x38(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x38(%rbp)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    11a6 <daxpy_vec+0xa6>
jmp    11e2 <daxpy_vec+0xe2>
jmp    11e7 <daxpy_vec+0xe7>
mov    -0x8(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x40(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
mov    -0x2c(%rbp),%ecx
sub    $0x3,%ecx
cmp    %ecx,%eax
jge    1349 <daxpy_vec+0x249>
movsd  -0x18(%rbp),%xmm0
mov    -0x40(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
mov    -0x24(%rbp),%ecx
mov    -0x40(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x40(%rbp)
mov    -0x28(%rbp),%ecx
mov    -0x38(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x38(%rbp)
movsd  -0x18(%rbp),%xmm0
mov    -0x40(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
mov    -0x24(%rbp),%ecx
mov    -0x40(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x40(%rbp)
mov    -0x28(%rbp),%ecx
mov    -0x38(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x38(%rbp)
movsd  -0x18(%rbp),%xmm0
mov    -0x40(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
mov    -0x24(%rbp),%ecx
mov    -0x40(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x40(%rbp)
mov    -0x28(%rbp),%ecx
mov    -0x38(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x38(%rbp)
movsd  -0x18(%rbp),%xmm0
mov    -0x40(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
mov    -0x24(%rbp),%ecx
mov    -0x40(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x40(%rbp)
mov    -0x28(%rbp),%ecx
mov    -0x38(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x38(%rbp)
mov    -0x30(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x30(%rbp)
jmp    11fe <daxpy_vec+0xfe>
mov    -0x30(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jne    135a <daxpy_vec+0x25a>
jmp    143c <daxpy_vec+0x33c>
mov    -0x30(%rbp),%eax
mov    -0x2c(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    140a <daxpy_vec+0x30a>
movsd  -0x18(%rbp),%xmm0
mov    -0x40(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
mov    -0x24(%rbp),%ecx
mov    -0x40(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x40(%rbp)
mov    -0x28(%rbp),%ecx
mov    -0x38(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x38(%rbp)
movsd  -0x18(%rbp),%xmm0
mov    -0x40(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
mov    -0x24(%rbp),%ecx
mov    -0x40(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x40(%rbp)
mov    -0x28(%rbp),%ecx
mov    -0x38(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x38(%rbp)
mov    -0x30(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    1437 <daxpy_vec+0x337>
movsd  -0x18(%rbp),%xmm0
mov    -0x40(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
jmp    143c <daxpy_vec+0x33c>
pop    %rbp
ret

x86 assembly (clang, -O2):
<daxpy_vec>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r8d,%r12d
mov    %ecx,%r14d
mov    %edx,%r15d
mov    %rsi,%rbp
mov    %rdi,%r13
ucomisd 0xece(%rip),%xmm1
jne    113a <daxpy_vec+0x2a>
jnp    1276 <daxpy_vec+0x166>
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm1
jne    116f <daxpy_vec+0x5f>
jp     116f <daxpy_vec+0x5f>
test   %r12d,%r12d
jle    1346 <daxpy_vec+0x236>
mov    %r12d,%edx
shl    $0x3,%rdx
mov    %r13,%rdi
xor    %esi,%esi
movsd  %xmm0,(%rsp)
call   1030 <memset@plt>
movsd  (%rsp),%xmm0
jmp    1276 <daxpy_vec+0x166>
test   %r12d,%r12d
jle    13c3 <daxpy_vec+0x2b3>
lea    -0x1(%r12),%ecx
xor    %eax,%eax
mov    %r13,%rdx
cmp    $0x3,%ecx
jb     124c <daxpy_vec+0x13c>
add    $0x1,%rcx
mov    %rcx,%rax
and    $0xfffffffffffffffc,%rax
movapd %xmm1,%xmm6
unpcklpd %xmm1,%xmm6
lea    -0x4(%rax),%rdx
mov    %rdx,%rsi
shr    $0x2,%rsi
add    $0x1,%rsi
test   %rdx,%rdx
je     13cc <daxpy_vec+0x2bc>
mov    %rsi,%rdi
and    $0xfffffffffffffffe,%rdi
xor    %edx,%edx
nop
movupd 0x0(%r13,%rdx,8),%xmm2
movupd 0x10(%r13,%rdx,8),%xmm3
movupd 0x20(%r13,%rdx,8),%xmm4
movupd 0x30(%r13,%rdx,8),%xmm5
mulpd  %xmm6,%xmm2
mulpd  %xmm6,%xmm3
movupd %xmm2,0x0(%r13,%rdx,8)
movupd %xmm3,0x10(%r13,%rdx,8)
mulpd  %xmm6,%xmm4
mulpd  %xmm6,%xmm5
movupd %xmm4,0x20(%r13,%rdx,8)
movupd %xmm5,0x30(%r13,%rdx,8)
add    $0x8,%rdx
add    $0xfffffffffffffffe,%rdi
jne    11c0 <daxpy_vec+0xb0>
test   $0x1,%sil
je     123c <daxpy_vec+0x12c>
movupd 0x0(%r13,%rdx,8),%xmm2
movupd 0x10(%r13,%rdx,8),%xmm3
mulpd  %xmm6,%xmm2
mulpd  %xmm6,%xmm3
movupd %xmm2,0x0(%r13,%rdx,8)
movupd %xmm3,0x10(%r13,%rdx,8)
cmp    %rax,%rcx
je     1276 <daxpy_vec+0x166>
lea    0x0(,%rax,8),%rdx
add    %r13,%rdx
mov    %r12d,%ecx
sub    %eax,%ecx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  (%rdx,%rax,8),%xmm2
mulsd  %xmm1,%xmm2
movsd  %xmm2,(%rdx,%rax,8)
add    $0x1,%rax
cmp    %eax,%ecx
jne    1260 <daxpy_vec+0x150>
xor    %eax,%eax
cmp    $0x4,%r12d
jl     1348 <daxpy_vec+0x238>
lea    -0x3(%r12),%r10d
movslq %r15d,%rsi
movslq %r14d,%rdi
mov    %rsi,%r8
shl    $0x5,%r8
mov    %rdi,%r9
shl    $0x5,%r9
shl    $0x3,%rsi
shl    $0x3,%rdi
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rbp,%r11
mov    %r13,%rbx
movsd  0x0(%rbp),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x0(%r13),%xmm1
movsd  %xmm1,0x0(%r13)
add    %rsi,%rbp
movsd  (%r11,%rsi,1),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x0(%r13,%rdi,1),%xmm1
lea    0x0(%r13,%rdi,1),%rax
movsd  %xmm1,0x0(%r13,%rdi,1)
lea    (%rax,%rdi,1),%rcx
movsd  (%rsi,%rbp,1),%xmm1
mulsd  %xmm0,%xmm1
add    %rsi,%rbp
addsd  (%rdi,%rax,1),%xmm1
movsd  %xmm1,(%rdi,%rax,1)
lea    (%rcx,%rdi,1),%r13
movsd  (%rsi,%rbp,1),%xmm1
mulsd  %xmm0,%xmm1
add    %rsi,%rbp
addsd  (%rdi,%rcx,1),%xmm1
movsd  %xmm1,(%rdi,%rcx,1)
add    $0x4,%edx
add    %rsi,%rbp
add    %rdi,%r13
cmp    %r10d,%edx
jl     12b0 <daxpy_vec+0x1a0>
add    %r8,%r11
add    %r9,%rbx
mov    %r12d,%eax
and    $0xfffffffc,%eax
mov    %rbx,%r13
mov    %r11,%rbp
cmp    %r12d,%eax
jne    134d <daxpy_vec+0x23d>
jmp    13b4 <daxpy_vec+0x2a4>
xor    %eax,%eax
cmp    %r12d,%eax
je     13b4 <daxpy_vec+0x2a4>
lea    -0x1(%r12),%ecx
cmp    %ecx,%eax
jge    139e <daxpy_vec+0x28e>
movsd  0x0(%rbp),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x0(%r13),%xmm1
movsd  %xmm1,0x0(%r13)
movslq %r15d,%rcx
lea    0x0(%rbp,%rcx,8),%rdx
movslq %r14d,%rsi
lea    0x0(%r13,%rsi,8),%rdi
movsd  0x0(%rbp,%rcx,8),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x0(%r13,%rsi,8),%xmm1
movsd  %xmm1,0x0(%r13,%rsi,8)
lea    (%rdx,%rcx,8),%rbp
lea    (%rdi,%rsi,8),%r13
or     $0x2,%eax
cmp    %r12d,%eax
jge    13b4 <daxpy_vec+0x2a4>
mulsd  0x0(%rbp),%xmm0
addsd  0x0(%r13),%xmm0
movsd  %xmm0,0x0(%r13)
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %eax,%eax
cmp    %r12d,%eax
jne    134d <daxpy_vec+0x23d>
jmp    13b4 <daxpy_vec+0x2a4>
xor    %edx,%edx
test   $0x1,%sil
jne    1218 <daxpy_vec+0x108>
jmp    123c <daxpy_vec+0x12c>

LLVM IR (-O0):
define void @daxpy_vec(double* %0, double* %1, double %2, double %3, i32 %4, i32 %5, i32 %6) {
%8 = alloca double*
%9 = alloca double*
%10 = alloca double
%11 = alloca double
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca double*
%17 = alloca double*
store double* %0, double** %8
store double* %1, double** %9
store double %2, double* %10
store double %3, double* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store i32 %6, i32* %14
%18 = load double, double* %11
%19 = fcmp une double %18, 1.000000e+00
br i1 %19, label %20, label %56
20: ; preds = %7
%21 = load double*, double** %8
store double* %21, double** %16
%22 = load double, double* %11
%23 = fcmp oeq double %22, 0.000000e+00
br i1 %23, label %24, label %38
24: ; preds = %20
store i32 0, i32* %15
br label %25
25: ; preds = %34, %24
%26 = load i32, i32* %15
%27 = load i32, i32* %14
%28 = icmp slt i32 %26, %27
br i1 %28, label %29, label %37
29: ; preds = %25
%30 = load double*, double** %16
%31 = getelementptr inbounds double, double* %30, i64 0
store double 0.000000e+00, double* %31
%32 = load double*, double** %16
%33 = getelementptr inbounds double, double* %32, i32 1
store double* %33, double** %16
br label %34
34: ; preds = %29
%35 = load i32, i32* %15
%36 = add nsw i32 %35, 1
store i32 %36, i32* %15
br label %25
37: ; preds = %25
br label %55
38: ; preds = %20
store i32 0, i32* %15
br label %39
39: ; preds = %51, %38
%40 = load i32, i32* %15
%41 = load i32, i32* %14
%42 = icmp slt i32 %40, %41
br i1 %42, label %43, label %54
43: ; preds = %39
%44 = load double, double* %11
%45 = load double*, double** %16
%46 = getelementptr inbounds double, double* %45, i64 0
%47 = load double, double* %46
%48 = fmul double %47, %44
store double %48, double* %46
%49 = load double*, double** %16
%50 = getelementptr inbounds double, double* %49, i32 1
store double* %50, double** %16
br label %51
51: ; preds = %43
%52 = load i32, i32* %15
%53 = add nsw i32 %52, 1
store i32 %53, i32* %15
br label %39
54: ; preds = %39
br label %55
55: ; preds = %54, %37
br label %56
56: ; preds = %55, %7
%57 = load double*, double** %8
store double* %57, double** %16
%58 = load double*, double** %9
store double* %58, double** %17
store i32 0, i32* %15
br label %59
59: ; preds = %129, %56
%60 = load i32, i32* %15
%61 = load i32, i32* %14
%62 = sub nsw i32 %61, 3
%63 = icmp slt i32 %60, %62
br i1 %63, label %64, label %132
64: ; preds = %59
%65 = load double, double* %10
%66 = load double*, double** %17
%67 = getelementptr inbounds double, double* %66, i64 0
%68 = load double, double* %67
%69 = load double*, double** %16
%70 = getelementptr inbounds double, double* %69, i64 0
%71 = load double, double* %70
%72 = call double @llvm.fmuladd.f64(double %65, double %68, double %71)
store double %72, double* %70
%73 = load i32, i32* %12
%74 = load double*, double** %17
%75 = sext i32 %73 to i64
%76 = getelementptr inbounds double, double* %74, i64 %75
store double* %76, double** %17
%77 = load i32, i32* %13
%78 = load double*, double** %16
%79 = sext i32 %77 to i64
%80 = getelementptr inbounds double, double* %78, i64 %79
store double* %80, double** %16
%81 = load double, double* %10
%82 = load double*, double** %17
%83 = getelementptr inbounds double, double* %82, i64 0
%84 = load double, double* %83
%85 = load double*, double** %16
%86 = getelementptr inbounds double, double* %85, i64 0
%87 = load double, double* %86
%88 = call double @llvm.fmuladd.f64(double %81, double %84, double %87)
store double %88, double* %86
%89 = load i32, i32* %12
%90 = load double*, double** %17
%91 = sext i32 %89 to i64
%92 = getelementptr inbounds double, double* %90, i64 %91
store double* %92, double** %17
%93 = load i32, i32* %13
%94 = load double*, double** %16
%95 = sext i32 %93 to i64
%96 = getelementptr inbounds double, double* %94, i64 %95
store double* %96, double** %16
%97 = load double, double* %10
%98 = load double*, double** %17
%99 = getelementptr inbounds double, double* %98, i64 0
%100 = load double, double* %99
%101 = load double*, double** %16
%102 = getelementptr inbounds double, double* %101, i64 0
%103 = load double, double* %102
%104 = call double @llvm.fmuladd.f64(double %97, double %100, double %103)
store double %104, double* %102
%105 = load i32, i32* %12
%106 = load double*, double** %17
%107 = sext i32 %105 to i64
%108 = getelementptr inbounds double, double* %106, i64 %107
store double* %108, double** %17
%109 = load i32, i32* %13
%110 = load double*, double** %16
%111 = sext i32 %109 to i64
%112 = getelementptr inbounds double, double* %110, i64 %111
store double* %112, double** %16
%113 = load double, double* %10
%114 = load double*, double** %17
%115 = getelementptr inbounds double, double* %114, i64 0
%116 = load double, double* %115
%117 = load double*, double** %16
%118 = getelementptr inbounds double, double* %117, i64 0
%119 = load double, double* %118
%120 = call double @llvm.fmuladd.f64(double %113, double %116, double %119)
store double %120, double* %118
%121 = load i32, i32* %12
%122 = load double*, double** %17
%123 = sext i32 %121 to i64
%124 = getelementptr inbounds double, double* %122, i64 %123
store double* %124, double** %17
%125 = load i32, i32* %13
%126 = load double*, double** %16
%127 = sext i32 %125 to i64
%128 = getelementptr inbounds double, double* %126, i64 %127
store double* %128, double** %16
br label %129
129: ; preds = %64
%130 = load i32, i32* %15
%131 = add nsw i32 %130, 4
store i32 %131, i32* %15
br label %59
132: ; preds = %59
%133 = load i32, i32* %15
%134 = load i32, i32* %14
%135 = icmp eq i32 %133, %134
br i1 %135, label %136, label %137
136: ; preds = %132
br label %191
137: ; preds = %132
%138 = load i32, i32* %15
%139 = load i32, i32* %14
%140 = sub nsw i32 %139, 1
%141 = icmp slt i32 %138, %140
br i1 %141, label %142, label %177
142: ; preds = %137
%143 = load double, double* %10
%144 = load double*, double** %17
%145 = getelementptr inbounds double, double* %144, i64 0
%146 = load double, double* %145
%147 = load double*, double** %16
%148 = getelementptr inbounds double, double* %147, i64 0
%149 = load double, double* %148
%150 = call double @llvm.fmuladd.f64(double %143, double %146, double %149)
store double %150, double* %148
%151 = load i32, i32* %12
%152 = load double*, double** %17
%153 = sext i32 %151 to i64
%154 = getelementptr inbounds double, double* %152, i64 %153
store double* %154, double** %17
%155 = load i32, i32* %13
%156 = load double*, double** %16
%157 = sext i32 %155 to i64
%158 = getelementptr inbounds double, double* %156, i64 %157
store double* %158, double** %16
%159 = load double, double* %10
%160 = load double*, double** %17
%161 = getelementptr inbounds double, double* %160, i64 0
%162 = load double, double* %161
%163 = load double*, double** %16
%164 = getelementptr inbounds double, double* %163, i64 0
%165 = load double, double* %164
%166 = call double @llvm.fmuladd.f64(double %159, double %162, double %165)
store double %166, double* %164
%167 = load i32, i32* %12
%168 = load double*, double** %17
%169 = sext i32 %167 to i64
%170 = getelementptr inbounds double, double* %168, i64 %169
store double* %170, double** %17
%171 = load i32, i32* %13
%172 = load double*, double** %16
%173 = sext i32 %171 to i64
%174 = getelementptr inbounds double, double* %172, i64 %173
store double* %174, double** %16
%175 = load i32, i32* %15
%176 = add nsw i32 %175, 2
store i32 %176, i32* %15
br label %177
177: ; preds = %142, %137
%178 = load i32, i32* %15
%179 = load i32, i32* %14
%180 = icmp slt i32 %178, %179
br i1 %180, label %181, label %190
181: ; preds = %177
%182 = load double, double* %10
%183 = load double*, double** %17
%184 = getelementptr inbounds double, double* %183, i64 0
%185 = load double, double* %184
%186 = load double*, double** %16
%187 = getelementptr inbounds double, double* %186, i64 0
%188 = load double, double* %187
%189 = call double @llvm.fmuladd.f64(double %182, double %185, double %188)
store double %189, double* %187
br label %190
190: ; preds = %181, %177
br label %191
191: ; preds = %190, %136
ret void
}

LLVM IR (-O2):
define void @daxpy_vec(double* nocapture %0, double* nocapture %1, double %2, double %3, i32 %4, i32 %5, i32 %6) {
%8 = bitcast double* %0 to i8*
%9 = fcmp une double %3, 1.000000e+00
br i1 %9, label %10, label %92
10: ; preds = %7
%11 = fcmp oeq double %3, 0.000000e+00
%12 = icmp sgt i32 %6, 0
br i1 %11, label %80, label %13
13: ; preds = %10
br i1 %12, label %14, label %126
14: ; preds = %13
%15 = add i32 %6, -1
%16 = zext i32 %15 to i64
%17 = add nuw nsw i64 %16, 1
%18 = icmp ult i32 %15, 3
br i1 %18, label %77, label %19
19: ; preds = %14
%20 = and i64 %17, 8589934588
%21 = getelementptr double, double* %0, i64 %20
%22 = trunc i64 %20 to i32
%23 = insertelement <2 x double> poison, double %3, i64 0
%24 = shufflevector <2 x double> %23, <2 x double> poison, <2 x i32> zeroinitializer
%25 = insertelement <2 x double> poison, double %3, i64 0
%26 = shufflevector <2 x double> %25, <2 x double> poison, <2 x i32> zeroinitializer
%27 = add nsw i64 %20, -4
%28 = lshr exact i64 %27, 2
%29 = add nuw nsw i64 %28, 1
%30 = and i64 %29, 1
%31 = icmp eq i64 %27, 0
br i1 %31, label %61, label %32
32: ; preds = %19
%33 = and i64 %29, 9223372036854775806
br label %34
34: ; preds = %34, %32
%35 = phi i64 [ 0, %32 ], [ %58, %34 ]
%36 = phi i64 [ 0, %32 ], [ %59, %34 ]
%37 = getelementptr double, double* %0, i64 %35
%38 = bitcast double* %37 to <2 x double>*
%39 = load <2 x double>, <2 x double>* %38
%40 = getelementptr double, double* %37, i64 2
%41 = bitcast double* %40 to <2 x double>*
%42 = load <2 x double>, <2 x double>* %41
%43 = fmul <2 x double> %39, %24
%44 = fmul <2 x double> %42, %26
%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 = or i64 %35, 4
%48 = getelementptr double, double* %0, i64 %47
%49 = bitcast double* %48 to <2 x double>*
%50 = load <2 x double>, <2 x double>* %49
%51 = getelementptr double, double* %48, i64 2
%52 = bitcast double* %51 to <2 x double>*
%53 = load <2 x double>, <2 x double>* %52
%54 = fmul <2 x double> %50, %24
%55 = fmul <2 x double> %53, %26
%56 = bitcast double* %48 to <2 x double>*
store <2 x double> %54, <2 x double>* %56
%57 = bitcast double* %51 to <2 x double>*
store <2 x double> %55, <2 x double>* %57
%58 = add nuw i64 %35, 8
%59 = add i64 %36, 2
%60 = icmp eq i64 %59, %33
br i1 %60, label %61, label %34
61: ; preds = %34, %19
%62 = phi i64 [ 0, %19 ], [ %58, %34 ]
%63 = icmp eq i64 %30, 0
br i1 %63, label %75, label %64
64: ; preds = %61
%65 = getelementptr double, double* %0, i64 %62
%66 = bitcast double* %65 to <2 x double>*
%67 = load <2 x double>, <2 x double>* %66
%68 = getelementptr double, double* %65, i64 2
%69 = bitcast double* %68 to <2 x double>*
%70 = load <2 x double>, <2 x double>* %69
%71 = fmul <2 x double> %67, %24
%72 = fmul <2 x double> %70, %26
%73 = bitcast double* %65 to <2 x double>*
store <2 x double> %71, <2 x double>* %73
%74 = bitcast double* %68 to <2 x double>*
store <2 x double> %72, <2 x double>* %74
br label %75
75: ; preds = %61, %64
%76 = icmp eq i64 %17, %20
br i1 %76, label %92, label %77
77: ; preds = %14, %75
%78 = phi double* [ %0, %14 ], [ %21, %75 ]
%79 = phi i32 [ 0, %14 ], [ %22, %75 ]
br label %84
80: ; preds = %10
br i1 %12, label %81, label %126
81: ; preds = %80
%82 = zext i32 %6 to i64
%83 = shl nuw nsw i64 %82, 3
br label %92
84: ; preds = %77, %84
%85 = phi double* [ %89, %84 ], [ %78, %77 ]
%86 = phi i32 [ %90, %84 ], [ %79, %77 ]
%87 = load double, double* %85
%88 = fmul double %87, %3
store double %88, double* %85
%89 = getelementptr inbounds double, double* %85, i64 1
%90 = add nuw nsw i32 %86, 1
%91 = icmp eq i32 %90, %6
br i1 %91, label %92, label %84
92: ; preds = %84, %75, %81, %7
%93 = add nsw i32 %6, -3
%94 = icmp sgt i32 %6, 3
br i1 %94, label %95, label %126
95: ; preds = %92
%96 = sext i32 %4 to i64
%97 = sext i32 %5 to i64
br label %98
98: ; preds = %95, %98
%99 = phi double* [ %1, %95 ], [ %120, %98 ]
%100 = phi double* [ %0, %95 ], [ %121, %98 ]
%101 = phi i32 [ 0, %95 ], [ %122, %98 ]
%102 = load double, double* %99
%103 = load double, double* %100
%104 = tail call double @llvm.fmuladd.f64(double %2, double %102, double %103)
store double %104, double* %100
%105 = getelementptr inbounds double, double* %99, i64 %96
%106 = getelementptr inbounds double, double* %100, i64 %97
%107 = load double, double* %105
%108 = load double, double* %106
%109 = tail call double @llvm.fmuladd.f64(double %2, double %107, double %108)
store double %109, double* %106
%110 = getelementptr inbounds double, double* %105, i64 %96
%111 = getelementptr inbounds double, double* %106, i64 %97
%112 = load double, double* %110
%113 = load double, double* %111
%114 = tail call double @llvm.fmuladd.f64(double %2, double %112, double %113)
store double %114, double* %111
%115 = getelementptr inbounds double, double* %110, i64 %96
%116 = getelementptr inbounds double, double* %111, i64 %97
%117 = load double, double* %115
%118 = load double, double* %116
%119 = tail call double @llvm.fmuladd.f64(double %2, double %117, double %118)
store double %119, double* %116
%120 = getelementptr inbounds double, double* %115, i64 %96
%121 = getelementptr inbounds double, double* %116, i64 %97
%122 = add nuw nsw i32 %101, 4
%123 = icmp slt i32 %122, %93
br i1 %123, label %98, label %124
124: ; preds = %98
%125 = and i32 %6, -4
br label %126
126: ; preds = %80, %13, %124, %92
%127 = phi i32 [ 0, %92 ], [ %125, %124 ], [ 0, %13 ], [ 0, %80 ]
%128 = phi double* [ %0, %92 ], [ %121, %124 ], [ %0, %13 ], [ %0, %80 ]
%129 = phi double* [ %1, %92 ], [ %120, %124 ], [ %1, %13 ], [ %1, %80 ]
%130 = icmp eq i32 %127, %6
br i1 %130, label %157, label %131
131: ; preds = %126
%132 = add nsw i32 %6, -1
%133 = icmp slt i32 %127, %132
br i1 %133, label %134, label %148
134: ; preds = %131
%135 = load double, double* %129
%136 = load double, double* %128
%137 = tail call double @llvm.fmuladd.f64(double %2, double %135, double %136)
store double %137, double* %128
%138 = sext i32 %4 to i64
%139 = getelementptr inbounds double, double* %129, i64 %138
%140 = sext i32 %5 to i64
%141 = getelementptr inbounds double, double* %128, i64 %140
%142 = load double, double* %139
%143 = load double, double* %141
%144 = tail call double @llvm.fmuladd.f64(double %2, double %142, double %143)
store double %144, double* %141
%145 = getelementptr inbounds double, double* %139, i64 %138
%146 = getelementptr inbounds double, double* %141, i64 %140
%147 = or i32 %127, 2
br label %148
148: ; preds = %134, %131
%149 = phi i32 [ %147, %134 ], [ %127, %131 ]
%150 = phi double* [ %146, %134 ], [ %128, %131 ]
%151 = phi double* [ %145, %134 ], [ %129, %131 ]
%152 = icmp slt i32 %149, %6
br i1 %152, label %153, label %157
153: ; preds = %148
%154 = load double, double* %151
%155 = load double, double* %150
%156 = tail call double @llvm.fmuladd.f64(double %2, double %154, double %155)
store double %156, double* %150
br label %157
157: ; preds = %148, %153, %126
ret void
}