void kernel_add_align_panel_4_0_lib4(int kmax, double alpha, double *A,
                                     double *B) {
  if (kmax <= 0)
    return;
  const int bs = 4;
  int k;
  for (k = 0; k < kmax - 3; k += 4) {
    B[0 + bs * 0] += alpha * A[0 + bs * 0];
    B[1 + bs * 0] += alpha * A[1 + bs * 0];
    B[2 + bs * 0] += alpha * A[2 + bs * 0];
    B[3 + bs * 0] += alpha * A[3 + bs * 0];
    B[0 + bs * 1] += alpha * A[0 + bs * 1];
    B[1 + bs * 1] += alpha * A[1 + bs * 1];
    B[2 + bs * 1] += alpha * A[2 + bs * 1];
    B[3 + bs * 1] += alpha * A[3 + bs * 1];
    B[0 + bs * 2] += alpha * A[0 + bs * 2];
    B[1 + bs * 2] += alpha * A[1 + bs * 2];
    B[2 + bs * 2] += alpha * A[2 + bs * 2];
    B[3 + bs * 2] += alpha * A[3 + bs * 2];
    B[0 + bs * 3] += alpha * A[0 + bs * 3];
    B[1 + bs * 3] += alpha * A[1 + bs * 3];
    B[2 + bs * 3] += alpha * A[2 + bs * 3];
    B[3 + bs * 3] += alpha * A[3 + bs * 3];
    A += 16;
    B += 16;
  }
  for (; k < kmax; k++) {
    B[0 + bs * 0] += alpha * A[0 + bs * 0];
    B[1 + bs * 0] += alpha * A[1 + bs * 0];
    B[2 + bs * 0] += alpha * A[2 + bs * 0];
    B[3 + bs * 0] += alpha * A[3 + bs * 0];
    A += 4;
    B += 4;
  }
}


x86 assembly (clang, -O0):
<kernel_add_align_panel_4_0_lib4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
cmpl   $0x0,-0x4(%rbp)
jg     1123 <kernel_add_align_panel_4_0_lib4+0x23>
jmp    146d <kernel_add_align_panel_4_0_lib4+0x36d>
movl   $0x4,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x3,%ecx
cmp    %ecx,%eax
jge    13a9 <kernel_add_align_panel_4_0_lib4+0x2a9>
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm2
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rax)
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm2
mov    -0x20(%rbp),%rax
movsd  0x10(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rax)
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  0x18(%rax),%xmm2
mov    -0x20(%rbp),%rax
movsd  0x18(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x18(%rax)
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  0x20(%rax),%xmm2
mov    -0x20(%rbp),%rax
movsd  0x20(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x20(%rax)
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  0x28(%rax),%xmm2
mov    -0x20(%rbp),%rax
movsd  0x28(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x28(%rax)
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  0x30(%rax),%xmm2
mov    -0x20(%rbp),%rax
movsd  0x30(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x30(%rax)
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  0x38(%rax),%xmm2
mov    -0x20(%rbp),%rax
movsd  0x38(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x38(%rax)
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  0x40(%rax),%xmm2
mov    -0x20(%rbp),%rax
movsd  0x40(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x40(%rax)
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  0x48(%rax),%xmm2
mov    -0x20(%rbp),%rax
movsd  0x48(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x48(%rax)
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  0x50(%rax),%xmm2
mov    -0x20(%rbp),%rax
movsd  0x50(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x50(%rax)
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  0x58(%rax),%xmm2
mov    -0x20(%rbp),%rax
movsd  0x58(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x58(%rax)
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  0x60(%rax),%xmm2
mov    -0x20(%rbp),%rax
movsd  0x60(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x60(%rax)
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  0x68(%rax),%xmm2
mov    -0x20(%rbp),%rax
movsd  0x68(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x68(%rax)
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  0x70(%rax),%xmm2
mov    -0x20(%rbp),%rax
movsd  0x70(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x70(%rax)
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  0x78(%rax),%xmm2
mov    -0x20(%rbp),%rax
movsd  0x78(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x78(%rax)
mov    -0x18(%rbp),%rax
add    $0x80,%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0x80,%rax
mov    %rax,-0x20(%rbp)
mov    -0x28(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x28(%rbp)
jmp    1131 <kernel_add_align_panel_4_0_lib4+0x31>
jmp    13ae <kernel_add_align_panel_4_0_lib4+0x2ae>
mov    -0x28(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    146d <kernel_add_align_panel_4_0_lib4+0x36d>
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm2
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rax)
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm2
mov    -0x20(%rbp),%rax
movsd  0x10(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rax)
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  0x18(%rax),%xmm2
mov    -0x20(%rbp),%rax
movsd  0x18(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x18(%rax)
mov    -0x18(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x20(%rbp)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    13ae <kernel_add_align_panel_4_0_lib4+0x2ae>
pop    %rbp
ret

x86 assembly (clang, -O2):
<kernel_add_align_panel_4_0_lib4>:
push   %rbx
test   %edi,%edi
jle    1312 <kernel_add_align_panel_4_0_lib4+0x212>
xor    %r8d,%r8d
cmp    $0x4,%edi
jb     1267 <kernel_add_align_panel_4_0_lib4+0x167>
lea    -0x3(%rdi),%eax
xor    %ecx,%ecx
nopw   0x0(%rax,%rax,1)
movsd  (%rsi),%xmm1
mulsd  %xmm0,%xmm1
addsd  (%rdx),%xmm1
movsd  %xmm1,(%rdx)
movsd  0x8(%rsi),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x8(%rdx),%xmm1
movsd  %xmm1,0x8(%rdx)
movsd  0x10(%rsi),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x10(%rdx),%xmm1
movsd  %xmm1,0x10(%rdx)
movsd  0x18(%rsi),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x18(%rdx),%xmm1
movsd  %xmm1,0x18(%rdx)
movsd  0x20(%rsi),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x20(%rdx),%xmm1
movsd  %xmm1,0x20(%rdx)
movsd  0x28(%rsi),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x28(%rdx),%xmm1
movsd  %xmm1,0x28(%rdx)
movsd  0x30(%rsi),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x30(%rdx),%xmm1
movsd  %xmm1,0x30(%rdx)
movsd  0x38(%rsi),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x38(%rdx),%xmm1
movsd  %xmm1,0x38(%rdx)
movsd  0x40(%rsi),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x40(%rdx),%xmm1
movsd  %xmm1,0x40(%rdx)
movsd  0x48(%rsi),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x48(%rdx),%xmm1
movsd  %xmm1,0x48(%rdx)
movsd  0x50(%rsi),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x50(%rdx),%xmm1
movsd  %xmm1,0x50(%rdx)
movsd  0x58(%rsi),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x58(%rdx),%xmm1
movsd  %xmm1,0x58(%rdx)
movsd  0x60(%rsi),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x60(%rdx),%xmm1
movsd  %xmm1,0x60(%rdx)
movsd  0x68(%rsi),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x68(%rdx),%xmm1
movsd  %xmm1,0x68(%rdx)
movsd  0x70(%rsi),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x70(%rdx),%xmm1
movsd  %xmm1,0x70(%rdx)
movsd  0x78(%rsi),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x78(%rdx),%xmm1
movsd  %xmm1,0x78(%rdx)
sub    $0xffffffffffffff80,%rsi
sub    $0xffffffffffffff80,%rdx
add    $0x4,%ecx
cmp    %eax,%ecx
jl     1120 <kernel_add_align_panel_4_0_lib4+0x20>
mov    %edi,%r8d
and    $0xfffffffc,%r8d
cmp    %edi,%r8d
jge    1312 <kernel_add_align_panel_4_0_lib4+0x212>
mov    %r8d,%r9d
not    %r9d
add    %edi,%r9d
je     129f <kernel_add_align_panel_4_0_lib4+0x19f>
mov    %r9,%rax
shl    $0x5,%rax
lea    (%rsi,%rax,1),%rcx
add    $0x20,%rcx
cmp    %rcx,%rdx
jae    1314 <kernel_add_align_panel_4_0_lib4+0x214>
add    %rdx,%rax
add    $0x20,%rax
cmp    %rax,%rsi
jae    1314 <kernel_add_align_panel_4_0_lib4+0x214>
mov    %rsi,%r11
mov    %rdx,%rax
sub    %r8d,%edi
xor    %ecx,%ecx
nopw   0x0(%rax,%rax,1)
movsd  (%r11,%rcx,1),%xmm1
mulsd  %xmm0,%xmm1
addsd  (%rax,%rcx,1),%xmm1
movsd  %xmm1,(%rax,%rcx,1)
movsd  0x8(%r11,%rcx,1),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x8(%rax,%rcx,1),%xmm1
movsd  %xmm1,0x8(%rax,%rcx,1)
movsd  0x10(%r11,%rcx,1),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x10(%rax,%rcx,1),%xmm1
movsd  %xmm1,0x10(%rax,%rcx,1)
movsd  0x18(%r11,%rcx,1),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x18(%rax,%rcx,1),%xmm1
movsd  %xmm1,0x18(%rax,%rcx,1)
add    $0x20,%rcx
add    $0xffffffff,%edi
jne    12b0 <kernel_add_align_panel_4_0_lib4+0x1b0>
pop    %rbx
ret
add    $0x1,%r9
mov    %r9,%r10
and    $0xfffffffffffffffe,%r10
add    %r10d,%r8d
mov    %r10,%rax
shl    $0x5,%rax
lea    (%rsi,%rax,1),%r11
add    %rdx,%rax
movapd %xmm0,%xmm8
unpcklpd %xmm0,%xmm8
xor    %ecx,%ecx
mov    %r10,%rbx
nop
movupd (%rsi,%rcx,1),%xmm2
movupd 0x10(%rsi,%rcx,1),%xmm3
movupd 0x20(%rsi,%rcx,1),%xmm5
movupd 0x30(%rsi,%rcx,1),%xmm6
movapd %xmm2,%xmm4
unpcklpd %xmm5,%xmm4
unpckhpd %xmm5,%xmm2
movapd %xmm3,%xmm5
unpcklpd %xmm6,%xmm5
unpckhpd %xmm6,%xmm3
movupd (%rdx,%rcx,1),%xmm6
movupd 0x10(%rdx,%rcx,1),%xmm10
movupd 0x20(%rdx,%rcx,1),%xmm1
movupd 0x30(%rdx,%rcx,1),%xmm9
movapd %xmm6,%xmm7
unpcklpd %xmm1,%xmm7
unpckhpd %xmm1,%xmm6
movapd %xmm10,%xmm1
unpcklpd %xmm9,%xmm1
unpckhpd %xmm9,%xmm10
mulpd  %xmm8,%xmm4
addpd  %xmm7,%xmm4
mulpd  %xmm8,%xmm2
addpd  %xmm6,%xmm2
mulpd  %xmm8,%xmm5
addpd  %xmm1,%xmm5
mulpd  %xmm8,%xmm3
addpd  %xmm10,%xmm3
movapd %xmm5,%xmm1
unpcklpd %xmm3,%xmm1
movapd %xmm4,%xmm6
unpcklpd %xmm2,%xmm6
movhlps %xmm5,%xmm3
movhlps %xmm4,%xmm2
movups %xmm2,0x20(%rdx,%rcx,1)
movups %xmm3,0x30(%rdx,%rcx,1)
movupd %xmm6,(%rdx,%rcx,1)
movupd %xmm1,0x10(%rdx,%rcx,1)
add    $0x40,%rcx
add    $0xfffffffffffffffe,%rbx
jne    1340 <kernel_add_align_panel_4_0_lib4+0x240>
cmp    %r10,%r9
jne    12a5 <kernel_add_align_panel_4_0_lib4+0x1a5>
jmp    1312 <kernel_add_align_panel_4_0_lib4+0x212>

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

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