void VecSelfAddScalarMult3fv(float v[3], const float a[3], float s) {
  v[0] += (s * a[0]);
  v[1] += (s * a[1]);
  v[2] += (s * a[2]);
}


x86 assembly (clang, -O0):
<VecSelfAddScalarMult3fv>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,(%rax)
movss  -0x14(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm2
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,0x4(%rax)
movss  -0x14(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm2
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<VecSelfAddScalarMult3fv>:
movss  (%rsi),%xmm1
mulss  %xmm0,%xmm1
addss  (%rdi),%xmm1
movss  %xmm1,(%rdi)
movss  0x4(%rsi),%xmm1
mulss  %xmm0,%xmm1
addss  0x4(%rdi),%xmm1
movss  %xmm1,0x4(%rdi)
mulss  0x8(%rsi),%xmm0
addss  0x8(%rdi),%xmm0
movss  %xmm0,0x8(%rdi)
ret

LLVM IR (-O0):
define void @VecSelfAddScalarMult3fv(float* %0, float* %1, float %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca float
store float* %0, float** %4
store float* %1, float** %5
store float %2, float* %6
%7 = load float, float* %6
%8 = load float*, float** %5
%9 = getelementptr inbounds float, float* %8, i64 0
%10 = load float, float* %9
%11 = load float*, float** %4
%12 = getelementptr inbounds float, float* %11, i64 0
%13 = load float, float* %12
%14 = call float @llvm.fmuladd.f32(float %7, float %10, float %13)
store float %14, float* %12
%15 = load float, float* %6
%16 = load float*, float** %5
%17 = getelementptr inbounds float, float* %16, i64 1
%18 = load float, float* %17
%19 = load float*, float** %4
%20 = getelementptr inbounds float, float* %19, i64 1
%21 = load float, float* %20
%22 = call float @llvm.fmuladd.f32(float %15, float %18, float %21)
store float %22, float* %20
%23 = load float, float* %6
%24 = load float*, float** %5
%25 = getelementptr inbounds float, float* %24, i64 2
%26 = load float, float* %25
%27 = load float*, float** %4
%28 = getelementptr inbounds float, float* %27, i64 2
%29 = load float, float* %28
%30 = call float @llvm.fmuladd.f32(float %23, float %26, float %29)
store float %30, float* %28
ret void
}

LLVM IR (-O2):
define void @VecSelfAddScalarMult3fv(float* nocapture %0, float* nocapture %1, float %2) {
%4 = load float, float* %1
%5 = load float, float* %0
%6 = tail call float @llvm.fmuladd.f32(float %2, float %4, float %5)
store float %6, float* %0
%7 = getelementptr inbounds float, float* %1, i64 1
%8 = load float, float* %7
%9 = getelementptr inbounds float, float* %0, i64 1
%10 = load float, float* %9
%11 = tail call float @llvm.fmuladd.f32(float %2, float %8, float %10)
store float %11, float* %9
%12 = getelementptr inbounds float, float* %1, i64 2
%13 = load float, float* %12
%14 = getelementptr inbounds float, float* %0, i64 2
%15 = load float, float* %14
%16 = tail call float @llvm.fmuladd.f32(float %2, float %13, float %15)
store float %16, float* %14
ret void
}