void kernel_strmv_u_n_4_lib4(int kmax, float *A, float *x, float *y, int alg) {
  if (kmax <= 0)
    return;
  const int lda = 4;
  int k;
  float x_0, x_1, x_2, x_3, y_0 = 0, y_1 = 0, y_2 = 0, y_3 = 0;
  x_0 = x[0];
  x_1 = x[1];
  x_2 = x[2];
  x_3 = x[3];
  y_0 += A[0 + lda * 0] * x_0;
  y_0 += A[0 + lda * 1] * x_1;
  y_1 += A[1 + lda * 1] * x_1;
  y_0 += A[0 + lda * 2] * x_2;
  y_1 += A[1 + lda * 2] * x_2;
  y_2 += A[2 + lda * 2] * x_2;
  y_0 += A[0 + lda * 3] * x_3;
  y_1 += A[1 + lda * 3] * x_3;
  y_2 += A[2 + lda * 3] * x_3;
  y_3 += A[3 + lda * 3] * x_3;
  A += 4 * lda;
  x += 4;
  k = 4;
  for (; k < kmax - 3; k += 4) {
    x_0 = x[0];
    x_1 = x[1];
    x_2 = x[2];
    x_3 = x[3];
    y_0 += A[0 + lda * 0] * x_0;
    y_1 += A[1 + lda * 0] * x_0;
    y_2 += A[2 + lda * 0] * x_0;
    y_3 += A[3 + lda * 0] * x_0;
    y_0 += A[0 + lda * 1] * x_1;
    y_1 += A[1 + lda * 1] * x_1;
    y_2 += A[2 + lda * 1] * x_1;
    y_3 += A[3 + lda * 1] * x_1;
    y_0 += A[0 + lda * 2] * x_2;
    y_1 += A[1 + lda * 2] * x_2;
    y_2 += A[2 + lda * 2] * x_2;
    y_3 += A[3 + lda * 2] * x_2;
    y_0 += A[0 + lda * 3] * x_3;
    y_1 += A[1 + lda * 3] * x_3;
    y_2 += A[2 + lda * 3] * x_3;
    y_3 += A[3 + lda * 3] * x_3;
    A += 4 * lda;
    x += 4;
  }
  for (; k < kmax; k++) {
    x_0 = x[0];
    y_0 += A[0 + lda * 0] * x_0;
    y_1 += A[1 + lda * 0] * x_0;
    y_2 += A[2 + lda * 0] * x_0;
    y_3 += A[3 + lda * 0] * x_0;
    A += 1 * lda;
    x += 1;
  }
  if (alg == 0) {
    y[0] = y_0;
    y[1] = y_1;
    y[2] = y_2;
    y[3] = y_3;
  } else if (alg == 1) {
    y[0] += y_0;
    y[1] += y_1;
    y[2] += y_2;
    y[3] += y_3;
  } else {
    y[0] -= y_0;
    y[1] -= y_1;
    y[2] -= y_2;
    y[3] -= y_3;
  }
}


x86 assembly (clang, -O0):
<kernel_strmv_u_n_4_lib4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
cmpl   $0x0,-0x4(%rbp)
jg     1126 <kernel_strmv_u_n_4_lib4+0x26>
jmp    1710 <kernel_strmv_u_n_4_lib4+0x610>
movl   $0x4,-0x28(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x40(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x44(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x48(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4c(%rbp)
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x30(%rbp)
mov    -0x18(%rbp),%rax
movss  0x4(%rax),%xmm0
movss  %xmm0,-0x34(%rbp)
mov    -0x18(%rbp),%rax
movss  0x8(%rax),%xmm0
movss  %xmm0,-0x38(%rbp)
mov    -0x18(%rbp),%rax
movss  0xc(%rax),%xmm0
movss  %xmm0,-0x3c(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
movss  -0x30(%rbp),%xmm2
movss  -0x40(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movss  0x10(%rax),%xmm0
movss  -0x34(%rbp),%xmm2
movss  -0x40(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movss  0x14(%rax),%xmm0
movss  -0x34(%rbp),%xmm2
movss  -0x44(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x44(%rbp)
mov    -0x10(%rbp),%rax
movss  0x20(%rax),%xmm0
movss  -0x38(%rbp),%xmm2
movss  -0x40(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movss  0x24(%rax),%xmm0
movss  -0x38(%rbp),%xmm2
movss  -0x44(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x44(%rbp)
mov    -0x10(%rbp),%rax
movss  0x28(%rax),%xmm0
movss  -0x38(%rbp),%xmm2
movss  -0x48(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%rax
movss  0x30(%rax),%xmm0
movss  -0x3c(%rbp),%xmm2
movss  -0x40(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movss  0x34(%rax),%xmm0
movss  -0x3c(%rbp),%xmm2
movss  -0x44(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x44(%rbp)
mov    -0x10(%rbp),%rax
movss  0x38(%rax),%xmm0
movss  -0x3c(%rbp),%xmm2
movss  -0x48(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%rax
movss  0x3c(%rax),%xmm0
movss  -0x3c(%rbp),%xmm2
movss  -0x4c(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x4c(%rbp)
mov    -0x10(%rbp),%rax
add    $0x40,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
add    $0x10,%rax
mov    %rax,-0x18(%rbp)
movl   $0x4,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x3,%ecx
cmp    %ecx,%eax
jge    154f <kernel_strmv_u_n_4_lib4+0x44f>
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x30(%rbp)
mov    -0x18(%rbp),%rax
movss  0x4(%rax),%xmm0
movss  %xmm0,-0x34(%rbp)
mov    -0x18(%rbp),%rax
movss  0x8(%rax),%xmm0
movss  %xmm0,-0x38(%rbp)
mov    -0x18(%rbp),%rax
movss  0xc(%rax),%xmm0
movss  %xmm0,-0x3c(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
movss  -0x30(%rbp),%xmm2
movss  -0x40(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
movss  -0x30(%rbp),%xmm2
movss  -0x44(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x44(%rbp)
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm0
movss  -0x30(%rbp),%xmm2
movss  -0x48(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%rax
movss  0xc(%rax),%xmm0
movss  -0x30(%rbp),%xmm2
movss  -0x4c(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x4c(%rbp)
mov    -0x10(%rbp),%rax
movss  0x10(%rax),%xmm0
movss  -0x34(%rbp),%xmm2
movss  -0x40(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movss  0x14(%rax),%xmm0
movss  -0x34(%rbp),%xmm2
movss  -0x44(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x44(%rbp)
mov    -0x10(%rbp),%rax
movss  0x18(%rax),%xmm0
movss  -0x34(%rbp),%xmm2
movss  -0x48(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%rax
movss  0x1c(%rax),%xmm0
movss  -0x34(%rbp),%xmm2
movss  -0x4c(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x4c(%rbp)
mov    -0x10(%rbp),%rax
movss  0x20(%rax),%xmm0
movss  -0x38(%rbp),%xmm2
movss  -0x40(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movss  0x24(%rax),%xmm0
movss  -0x38(%rbp),%xmm2
movss  -0x44(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x44(%rbp)
mov    -0x10(%rbp),%rax
movss  0x28(%rax),%xmm0
movss  -0x38(%rbp),%xmm2
movss  -0x48(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%rax
movss  0x2c(%rax),%xmm0
movss  -0x38(%rbp),%xmm2
movss  -0x4c(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x4c(%rbp)
mov    -0x10(%rbp),%rax
movss  0x30(%rax),%xmm0
movss  -0x3c(%rbp),%xmm2
movss  -0x40(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movss  0x34(%rax),%xmm0
movss  -0x3c(%rbp),%xmm2
movss  -0x44(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x44(%rbp)
mov    -0x10(%rbp),%rax
movss  0x38(%rax),%xmm0
movss  -0x3c(%rbp),%xmm2
movss  -0x48(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%rax
movss  0x3c(%rax),%xmm0
movss  -0x3c(%rbp),%xmm2
movss  -0x4c(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x4c(%rbp)
mov    -0x10(%rbp),%rax
add    $0x40,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
add    $0x10,%rax
mov    %rax,-0x18(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x2c(%rbp)
jmp    12e2 <kernel_strmv_u_n_4_lib4+0x1e2>
jmp    1554 <kernel_strmv_u_n_4_lib4+0x454>
mov    -0x2c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1612 <kernel_strmv_u_n_4_lib4+0x512>
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x30(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
movss  -0x30(%rbp),%xmm2
movss  -0x40(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
movss  -0x30(%rbp),%xmm2
movss  -0x44(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x44(%rbp)
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm0
movss  -0x30(%rbp),%xmm2
movss  -0x48(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%rax
movss  0xc(%rax),%xmm0
movss  -0x30(%rbp),%xmm2
movss  -0x4c(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x4c(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x18(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1554 <kernel_strmv_u_n_4_lib4+0x454>
cmpl   $0x0,-0x24(%rbp)
jne    1658 <kernel_strmv_u_n_4_lib4+0x558>
movss  -0x40(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x44(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,0x4(%rax)
movss  -0x48(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,0x8(%rax)
movss  -0x4c(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,0xc(%rax)
jmp    1710 <kernel_strmv_u_n_4_lib4+0x610>
cmpl   $0x1,-0x24(%rbp)
jne    16b1 <kernel_strmv_u_n_4_lib4+0x5b1>
movss  -0x40(%rbp),%xmm0
mov    -0x20(%rbp),%rax
addss  (%rax),%xmm0
movss  %xmm0,(%rax)
movss  -0x44(%rbp),%xmm0
mov    -0x20(%rbp),%rax
addss  0x4(%rax),%xmm0
movss  %xmm0,0x4(%rax)
movss  -0x48(%rbp),%xmm0
mov    -0x20(%rbp),%rax
addss  0x8(%rax),%xmm0
movss  %xmm0,0x8(%rax)
movss  -0x4c(%rbp),%xmm0
mov    -0x20(%rbp),%rax
addss  0xc(%rax),%xmm0
movss  %xmm0,0xc(%rax)
jmp    170b <kernel_strmv_u_n_4_lib4+0x60b>
movss  -0x40(%rbp),%xmm1
mov    -0x20(%rbp),%rax
movss  (%rax),%xmm0
subss  %xmm1,%xmm0
movss  %xmm0,(%rax)
movss  -0x44(%rbp),%xmm1
mov    -0x20(%rbp),%rax
movss  0x4(%rax),%xmm0
subss  %xmm1,%xmm0
movss  %xmm0,0x4(%rax)
movss  -0x48(%rbp),%xmm1
mov    -0x20(%rbp),%rax
movss  0x8(%rax),%xmm0
subss  %xmm1,%xmm0
movss  %xmm0,0x8(%rax)
movss  -0x4c(%rbp),%xmm1
mov    -0x20(%rbp),%rax
movss  0xc(%rax),%xmm0
subss  %xmm1,%xmm0
movss  %xmm0,0xc(%rax)
jmp    1710 <kernel_strmv_u_n_4_lib4+0x610>
pop    %rbp
ret

x86 assembly (clang, -O2):
<kernel_strmv_u_n_4_lib4>:
test   %edi,%edi
jle    12aa <kernel_strmv_u_n_4_lib4+0x1aa>
movss  0x4(%rdx),%xmm1
movss  0x8(%rdx),%xmm2
movss  (%rsi),%xmm0
mulss  (%rdx),%xmm0
xorps  %xmm3,%xmm3
addss  %xmm3,%xmm0
movss  0x10(%rsi),%xmm4
mulss  %xmm1,%xmm4
mulss  0x14(%rsi),%xmm1
addss  %xmm0,%xmm4
addss  %xmm3,%xmm1
movss  0x20(%rsi),%xmm3
mulss  %xmm2,%xmm3
addss  %xmm4,%xmm3
movsd  0x24(%rsi),%xmm0
unpcklps %xmm2,%xmm2
mulps  %xmm0,%xmm2
xorps  %xmm0,%xmm0
xorps  %xmm4,%xmm4
movss  %xmm1,%xmm4
addps  %xmm2,%xmm4
movups 0x30(%rsi),%xmm1
movss  0xc(%rdx),%xmm2
shufps $0x0,%xmm2,%xmm2
mulps  %xmm1,%xmm2
movss  %xmm3,%xmm0
shufps $0x4c,%xmm4,%xmm0
shufps $0x78,%xmm0,%xmm0
addps  %xmm2,%xmm0
add    $0x40,%rsi
add    $0x10,%rdx
mov    $0x4,%eax
cmp    $0x8,%edi
jb     120a <kernel_strmv_u_n_4_lib4+0x10a>
lea    -0x3(%rdi),%r9d
mov    $0x4,%eax
nopw   0x0(%rax,%rax,1)
movups (%rsi),%xmm3
movups 0x10(%rsi),%xmm4
movups 0x20(%rsi),%xmm5
movups 0x30(%rsi),%xmm8
movss  (%rdx),%xmm7
movss  0x4(%rdx),%xmm6
movss  0x8(%rdx),%xmm2
movss  0xc(%rdx),%xmm1
shufps $0x0,%xmm7,%xmm7
mulps  %xmm3,%xmm7
addps  %xmm0,%xmm7
shufps $0x0,%xmm6,%xmm6
mulps  %xmm4,%xmm6
addps  %xmm7,%xmm6
shufps $0x0,%xmm2,%xmm2
mulps  %xmm5,%xmm2
addps  %xmm6,%xmm2
shufps $0x0,%xmm1,%xmm1
mulps  %xmm8,%xmm1
movaps %xmm1,%xmm0
addps  %xmm2,%xmm0
add    $0x4,%eax
add    $0x40,%rsi
add    $0x10,%rdx
cmp    %r9d,%eax
jl     11a0 <kernel_strmv_u_n_4_lib4+0xa0>
addps  %xmm2,%xmm1
mov    %edi,%eax
and    $0xfffffffc,%eax
movaps %xmm1,%xmm0
cmp    %edi,%eax
jge    1221 <kernel_strmv_u_n_4_lib4+0x121>
mov    %eax,%r9d
not    %r9d
test   $0x1,%dil
jne    1226 <kernel_strmv_u_n_4_lib4+0x126>
add    %edi,%r9d
jne    124a <kernel_strmv_u_n_4_lib4+0x14a>
jmp    1288 <kernel_strmv_u_n_4_lib4+0x188>
movaps %xmm0,%xmm1
jmp    1288 <kernel_strmv_u_n_4_lib4+0x188>
movups (%rsi),%xmm2
movss  (%rdx),%xmm1
shufps $0x0,%xmm1,%xmm1
mulps  %xmm2,%xmm1
addps  %xmm0,%xmm1
add    $0x10,%rsi
add    $0x4,%rdx
or     $0x1,%eax
movaps %xmm1,%xmm0
add    %edi,%r9d
je     1288 <kernel_strmv_u_n_4_lib4+0x188>
sub    %eax,%edi
xor    %eax,%eax
xchg   %ax,%ax
movss  (%rdx,%rax,4),%xmm3
movss  0x4(%rdx,%rax,4),%xmm1
shufps $0x0,%xmm3,%xmm3
movups (%rsi),%xmm2
mulps  %xmm3,%xmm2
addps  %xmm0,%xmm2
movups 0x10(%rsi),%xmm0
shufps $0x0,%xmm1,%xmm1
mulps  %xmm0,%xmm1
movaps %xmm1,%xmm0
addps  %xmm2,%xmm0
add    $0x2,%rax
add    $0x20,%rsi
cmp    %eax,%edi
jne    1250 <kernel_strmv_u_n_4_lib4+0x150>
addps  %xmm2,%xmm1
cmp    $0x1,%r8d
je     1297 <kernel_strmv_u_n_4_lib4+0x197>
test   %r8d,%r8d
jne    12a1 <kernel_strmv_u_n_4_lib4+0x1a1>
movups %xmm1,(%rcx)
ret
movups (%rcx),%xmm0
addps  %xmm0,%xmm1
movups %xmm1,(%rcx)
ret
movups (%rcx),%xmm0
subps  %xmm1,%xmm0
movups %xmm0,(%rcx)
ret

LLVM IR (-O0):
define void @kernel_strmv_u_n_4_lib4(i32 %0, float* %1, float* %2, float* %3, i32 %4) {
%6 = alloca i32
%7 = alloca float*
%8 = alloca float*
%9 = alloca float*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca float
%14 = alloca float
%15 = alloca float
%16 = alloca float
%17 = alloca float
%18 = alloca float
%19 = alloca float
%20 = alloca float
store i32 %0, i32* %6
store float* %1, float** %7
store float* %2, float** %8
store float* %3, float** %9
store i32 %4, i32* %10
%21 = load i32, i32* %6
%22 = icmp sle i32 %21, 0
br i1 %22, label %23, label %24
23: ; preds = %5
br label %324
24: ; preds = %5
store i32 4, i32* %11
store float 0.000000e+00, float* %17
store float 0.000000e+00, float* %18
store float 0.000000e+00, float* %19
store float 0.000000e+00, float* %20
%25 = load float*, float** %8
%26 = getelementptr inbounds float, float* %25, i64 0
%27 = load float, float* %26
store float %27, float* %13
%28 = load float*, float** %8
%29 = getelementptr inbounds float, float* %28, i64 1
%30 = load float, float* %29
store float %30, float* %14
%31 = load float*, float** %8
%32 = getelementptr inbounds float, float* %31, i64 2
%33 = load float, float* %32
store float %33, float* %15
%34 = load float*, float** %8
%35 = getelementptr inbounds float, float* %34, i64 3
%36 = load float, float* %35
store float %36, float* %16
%37 = load float*, float** %7
%38 = getelementptr inbounds float, float* %37, i64 0
%39 = load float, float* %38
%40 = load float, float* %13
%41 = load float, float* %17
%42 = call float @llvm.fmuladd.f32(float %39, float %40, float %41)
store float %42, float* %17
%43 = load float*, float** %7
%44 = getelementptr inbounds float, float* %43, i64 4
%45 = load float, float* %44
%46 = load float, float* %14
%47 = load float, float* %17
%48 = call float @llvm.fmuladd.f32(float %45, float %46, float %47)
store float %48, float* %17
%49 = load float*, float** %7
%50 = getelementptr inbounds float, float* %49, i64 5
%51 = load float, float* %50
%52 = load float, float* %14
%53 = load float, float* %18
%54 = call float @llvm.fmuladd.f32(float %51, float %52, float %53)
store float %54, float* %18
%55 = load float*, float** %7
%56 = getelementptr inbounds float, float* %55, i64 8
%57 = load float, float* %56
%58 = load float, float* %15
%59 = load float, float* %17
%60 = call float @llvm.fmuladd.f32(float %57, float %58, float %59)
store float %60, float* %17
%61 = load float*, float** %7
%62 = getelementptr inbounds float, float* %61, i64 9
%63 = load float, float* %62
%64 = load float, float* %15
%65 = load float, float* %18
%66 = call float @llvm.fmuladd.f32(float %63, float %64, float %65)
store float %66, float* %18
%67 = load float*, float** %7
%68 = getelementptr inbounds float, float* %67, i64 10
%69 = load float, float* %68
%70 = load float, float* %15
%71 = load float, float* %19
%72 = call float @llvm.fmuladd.f32(float %69, float %70, float %71)
store float %72, float* %19
%73 = load float*, float** %7
%74 = getelementptr inbounds float, float* %73, i64 12
%75 = load float, float* %74
%76 = load float, float* %16
%77 = load float, float* %17
%78 = call float @llvm.fmuladd.f32(float %75, float %76, float %77)
store float %78, float* %17
%79 = load float*, float** %7
%80 = getelementptr inbounds float, float* %79, i64 13
%81 = load float, float* %80
%82 = load float, float* %16
%83 = load float, float* %18
%84 = call float @llvm.fmuladd.f32(float %81, float %82, float %83)
store float %84, float* %18
%85 = load float*, float** %7
%86 = getelementptr inbounds float, float* %85, i64 14
%87 = load float, float* %86
%88 = load float, float* %16
%89 = load float, float* %19
%90 = call float @llvm.fmuladd.f32(float %87, float %88, float %89)
store float %90, float* %19
%91 = load float*, float** %7
%92 = getelementptr inbounds float, float* %91, i64 15
%93 = load float, float* %92
%94 = load float, float* %16
%95 = load float, float* %20
%96 = call float @llvm.fmuladd.f32(float %93, float %94, float %95)
store float %96, float* %20
%97 = load float*, float** %7
%98 = getelementptr inbounds float, float* %97, i64 16
store float* %98, float** %7
%99 = load float*, float** %8
%100 = getelementptr inbounds float, float* %99, i64 4
store float* %100, float** %8
store i32 4, i32* %12
br label %101
101: ; preds = %219, %24
%102 = load i32, i32* %12
%103 = load i32, i32* %6
%104 = sub nsw i32 %103, 3
%105 = icmp slt i32 %102, %104
br i1 %105, label %106, label %222
106: ; preds = %101
%107 = load float*, float** %8
%108 = getelementptr inbounds float, float* %107, i64 0
%109 = load float, float* %108
store float %109, float* %13
%110 = load float*, float** %8
%111 = getelementptr inbounds float, float* %110, i64 1
%112 = load float, float* %111
store float %112, float* %14
%113 = load float*, float** %8
%114 = getelementptr inbounds float, float* %113, i64 2
%115 = load float, float* %114
store float %115, float* %15
%116 = load float*, float** %8
%117 = getelementptr inbounds float, float* %116, i64 3
%118 = load float, float* %117
store float %118, float* %16
%119 = load float*, float** %7
%120 = getelementptr inbounds float, float* %119, i64 0
%121 = load float, float* %120
%122 = load float, float* %13
%123 = load float, float* %17
%124 = call float @llvm.fmuladd.f32(float %121, float %122, float %123)
store float %124, float* %17
%125 = load float*, float** %7
%126 = getelementptr inbounds float, float* %125, i64 1
%127 = load float, float* %126
%128 = load float, float* %13
%129 = load float, float* %18
%130 = call float @llvm.fmuladd.f32(float %127, float %128, float %129)
store float %130, float* %18
%131 = load float*, float** %7
%132 = getelementptr inbounds float, float* %131, i64 2
%133 = load float, float* %132
%134 = load float, float* %13
%135 = load float, float* %19
%136 = call float @llvm.fmuladd.f32(float %133, float %134, float %135)
store float %136, float* %19
%137 = load float*, float** %7
%138 = getelementptr inbounds float, float* %137, i64 3
%139 = load float, float* %138
%140 = load float, float* %13
%141 = load float, float* %20
%142 = call float @llvm.fmuladd.f32(float %139, float %140, float %141)
store float %142, float* %20
%143 = load float*, float** %7
%144 = getelementptr inbounds float, float* %143, i64 4
%145 = load float, float* %144
%146 = load float, float* %14
%147 = load float, float* %17
%148 = call float @llvm.fmuladd.f32(float %145, float %146, float %147)
store float %148, float* %17
%149 = load float*, float** %7
%150 = getelementptr inbounds float, float* %149, i64 5
%151 = load float, float* %150
%152 = load float, float* %14
%153 = load float, float* %18
%154 = call float @llvm.fmuladd.f32(float %151, float %152, float %153)
store float %154, float* %18
%155 = load float*, float** %7
%156 = getelementptr inbounds float, float* %155, i64 6
%157 = load float, float* %156
%158 = load float, float* %14
%159 = load float, float* %19
%160 = call float @llvm.fmuladd.f32(float %157, float %158, float %159)
store float %160, float* %19
%161 = load float*, float** %7
%162 = getelementptr inbounds float, float* %161, i64 7
%163 = load float, float* %162
%164 = load float, float* %14
%165 = load float, float* %20
%166 = call float @llvm.fmuladd.f32(float %163, float %164, float %165)
store float %166, float* %20
%167 = load float*, float** %7
%168 = getelementptr inbounds float, float* %167, i64 8
%169 = load float, float* %168
%170 = load float, float* %15
%171 = load float, float* %17
%172 = call float @llvm.fmuladd.f32(float %169, float %170, float %171)
store float %172, float* %17
%173 = load float*, float** %7
%174 = getelementptr inbounds float, float* %173, i64 9
%175 = load float, float* %174
%176 = load float, float* %15
%177 = load float, float* %18
%178 = call float @llvm.fmuladd.f32(float %175, float %176, float %177)
store float %178, float* %18
%179 = load float*, float** %7
%180 = getelementptr inbounds float, float* %179, i64 10
%181 = load float, float* %180
%182 = load float, float* %15
%183 = load float, float* %19
%184 = call float @llvm.fmuladd.f32(float %181, float %182, float %183)
store float %184, float* %19
%185 = load float*, float** %7
%186 = getelementptr inbounds float, float* %185, i64 11
%187 = load float, float* %186
%188 = load float, float* %15
%189 = load float, float* %20
%190 = call float @llvm.fmuladd.f32(float %187, float %188, float %189)
store float %190, float* %20
%191 = load float*, float** %7
%192 = getelementptr inbounds float, float* %191, i64 12
%193 = load float, float* %192
%194 = load float, float* %16
%195 = load float, float* %17
%196 = call float @llvm.fmuladd.f32(float %193, float %194, float %195)
store float %196, float* %17
%197 = load float*, float** %7
%198 = getelementptr inbounds float, float* %197, i64 13
%199 = load float, float* %198
%200 = load float, float* %16
%201 = load float, float* %18
%202 = call float @llvm.fmuladd.f32(float %199, float %200, float %201)
store float %202, float* %18
%203 = load float*, float** %7
%204 = getelementptr inbounds float, float* %203, i64 14
%205 = load float, float* %204
%206 = load float, float* %16
%207 = load float, float* %19
%208 = call float @llvm.fmuladd.f32(float %205, float %206, float %207)
store float %208, float* %19
%209 = load float*, float** %7
%210 = getelementptr inbounds float, float* %209, i64 15
%211 = load float, float* %210
%212 = load float, float* %16
%213 = load float, float* %20
%214 = call float @llvm.fmuladd.f32(float %211, float %212, float %213)
store float %214, float* %20
%215 = load float*, float** %7
%216 = getelementptr inbounds float, float* %215, i64 16
store float* %216, float** %7
%217 = load float*, float** %8
%218 = getelementptr inbounds float, float* %217, i64 4
store float* %218, float** %8
br label %219
219: ; preds = %106
%220 = load i32, i32* %12
%221 = add nsw i32 %220, 4
store i32 %221, i32* %12
br label %101
222: ; preds = %101
br label %223
223: ; preds = %259, %222
%224 = load i32, i32* %12
%225 = load i32, i32* %6
%226 = icmp slt i32 %224, %225
br i1 %226, label %227, label %262
227: ; preds = %223
%228 = load float*, float** %8
%229 = getelementptr inbounds float, float* %228, i64 0
%230 = load float, float* %229
store float %230, float* %13
%231 = load float*, float** %7
%232 = getelementptr inbounds float, float* %231, i64 0
%233 = load float, float* %232
%234 = load float, float* %13
%235 = load float, float* %17
%236 = call float @llvm.fmuladd.f32(float %233, float %234, float %235)
store float %236, float* %17
%237 = load float*, float** %7
%238 = getelementptr inbounds float, float* %237, i64 1
%239 = load float, float* %238
%240 = load float, float* %13
%241 = load float, float* %18
%242 = call float @llvm.fmuladd.f32(float %239, float %240, float %241)
store float %242, float* %18
%243 = load float*, float** %7
%244 = getelementptr inbounds float, float* %243, i64 2
%245 = load float, float* %244
%246 = load float, float* %13
%247 = load float, float* %19
%248 = call float @llvm.fmuladd.f32(float %245, float %246, float %247)
store float %248, float* %19
%249 = load float*, float** %7
%250 = getelementptr inbounds float, float* %249, i64 3
%251 = load float, float* %250
%252 = load float, float* %13
%253 = load float, float* %20
%254 = call float @llvm.fmuladd.f32(float %251, float %252, float %253)
store float %254, float* %20
%255 = load float*, float** %7
%256 = getelementptr inbounds float, float* %255, i64 4
store float* %256, float** %7
%257 = load float*, float** %8
%258 = getelementptr inbounds float, float* %257, i64 1
store float* %258, float** %8
br label %259
259: ; preds = %227
%260 = load i32, i32* %12
%261 = add nsw i32 %260, 1
store i32 %261, i32* %12
br label %223
262: ; preds = %223
%263 = load i32, i32* %10
%264 = icmp eq i32 %263, 0
br i1 %264, label %265, label %278
265: ; preds = %262
%266 = load float, float* %17
%267 = load float*, float** %9
%268 = getelementptr inbounds float, float* %267, i64 0
store float %266, float* %268
%269 = load float, float* %18
%270 = load float*, float** %9
%271 = getelementptr inbounds float, float* %270, i64 1
store float %269, float* %271
%272 = load float, float* %19
%273 = load float*, float** %9
%274 = getelementptr inbounds float, float* %273, i64 2
store float %272, float* %274
%275 = load float, float* %20
%276 = load float*, float** %9
%277 = getelementptr inbounds float, float* %276, i64 3
store float %275, float* %277
br label %324
278: ; preds = %262
%279 = load i32, i32* %10
%280 = icmp eq i32 %279, 1
br i1 %280, label %281, label %302
281: ; preds = %278
%282 = load float, float* %17
%283 = load float*, float** %9
%284 = getelementptr inbounds float, float* %283, i64 0
%285 = load float, float* %284
%286 = fadd float %285, %282
store float %286, float* %284
%287 = load float, float* %18
%288 = load float*, float** %9
%289 = getelementptr inbounds float, float* %288, i64 1
%290 = load float, float* %289
%291 = fadd float %290, %287
store float %291, float* %289
%292 = load float, float* %19
%293 = load float*, float** %9
%294 = getelementptr inbounds float, float* %293, i64 2
%295 = load float, float* %294
%296 = fadd float %295, %292
store float %296, float* %294
%297 = load float, float* %20
%298 = load float*, float** %9
%299 = getelementptr inbounds float, float* %298, i64 3
%300 = load float, float* %299
%301 = fadd float %300, %297
store float %301, float* %299
br label %323
302: ; preds = %278
%303 = load float, float* %17
%304 = load float*, float** %9
%305 = getelementptr inbounds float, float* %304, i64 0
%306 = load float, float* %305
%307 = fsub float %306, %303
store float %307, float* %305
%308 = load float, float* %18
%309 = load float*, float** %9
%310 = getelementptr inbounds float, float* %309, i64 1
%311 = load float, float* %310
%312 = fsub float %311, %308
store float %312, float* %310
%313 = load float, float* %19
%314 = load float*, float** %9
%315 = getelementptr inbounds float, float* %314, i64 2
%316 = load float, float* %315
%317 = fsub float %316, %313
store float %317, float* %315
%318 = load float, float* %20
%319 = load float*, float** %9
%320 = getelementptr inbounds float, float* %319, i64 3
%321 = load float, float* %320
%322 = fsub float %321, %318
store float %322, float* %320
br label %323
323: ; preds = %302, %281
br label %324
324: ; preds = %23, %323, %265
ret void
}

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