void glmMakeVector4f(float result[4], const float p1[4], const float p2[4]) {
  result[0] = p2[0] - p1[0];
  result[1] = p2[1] - p1[1];
  result[2] = p2[2] - p1[2];
  result[3] = p2[3] - p1[3];
}


x86 assembly (clang, -O0):
<glmMakeVector4f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
subss  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x10(%rbp),%rax
subss  0x4(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x18(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
subss  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x8(%rax)
mov    -0x18(%rbp),%rax
movss  0xc(%rax),%xmm0
mov    -0x10(%rbp),%rax
subss  0xc(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmMakeVector4f>:
movss  (%rdx),%xmm0
subss  (%rsi),%xmm0
movss  %xmm0,(%rdi)
movss  0x4(%rdx),%xmm0
subss  0x4(%rsi),%xmm0
movss  %xmm0,0x4(%rdi)
movss  0x8(%rdx),%xmm0
subss  0x8(%rsi),%xmm0
movss  %xmm0,0x8(%rdi)
movss  0xc(%rdx),%xmm0
subss  0xc(%rsi),%xmm0
movss  %xmm0,0xc(%rdi)
ret

LLVM IR (-O0):
define void @glmMakeVector4f(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 = getelementptr inbounds float, float* %7, i64 0
%9 = load float, float* %8
%10 = load float*, float** %5
%11 = getelementptr inbounds float, float* %10, i64 0
%12 = load float, float* %11
%13 = fsub float %9, %12
%14 = load float*, float** %4
%15 = getelementptr inbounds float, float* %14, i64 0
store float %13, float* %15
%16 = load float*, float** %6
%17 = getelementptr inbounds float, float* %16, i64 1
%18 = load float, float* %17
%19 = load float*, float** %5
%20 = getelementptr inbounds float, float* %19, i64 1
%21 = load float, float* %20
%22 = fsub float %18, %21
%23 = load float*, float** %4
%24 = getelementptr inbounds float, float* %23, i64 1
store float %22, float* %24
%25 = load float*, float** %6
%26 = getelementptr inbounds float, float* %25, i64 2
%27 = load float, float* %26
%28 = load float*, float** %5
%29 = getelementptr inbounds float, float* %28, i64 2
%30 = load float, float* %29
%31 = fsub float %27, %30
%32 = load float*, float** %4
%33 = getelementptr inbounds float, float* %32, i64 2
store float %31, float* %33
%34 = load float*, float** %6
%35 = getelementptr inbounds float, float* %34, i64 3
%36 = load float, float* %35
%37 = load float*, float** %5
%38 = getelementptr inbounds float, float* %37, i64 3
%39 = load float, float* %38
%40 = fsub float %36, %39
%41 = load float*, float** %4
%42 = getelementptr inbounds float, float* %41, i64 3
store float %40, float* %42
ret void
}

LLVM IR (-O2):
define void @glmMakeVector4f(float* nocapture writeonly %0, float* nocapture %1, float* nocapture %2) {
%4 = load float, float* %2
%5 = load float, float* %1
%6 = fsub float %4, %5
store float %6, float* %0
%7 = getelementptr inbounds float, float* %2, i64 1
%8 = load float, float* %7
%9 = getelementptr inbounds float, float* %1, i64 1
%10 = load float, float* %9
%11 = fsub float %8, %10
%12 = getelementptr inbounds float, float* %0, i64 1
store float %11, float* %12
%13 = getelementptr inbounds float, float* %2, i64 2
%14 = load float, float* %13
%15 = getelementptr inbounds float, float* %1, i64 2
%16 = load float, float* %15
%17 = fsub float %14, %16
%18 = getelementptr inbounds float, float* %0, i64 2
store float %17, float* %18
%19 = getelementptr inbounds float, float* %2, i64 3
%20 = load float, float* %19
%21 = getelementptr inbounds float, float* %1, i64 3
%22 = load float, float* %21
%23 = fsub float %20, %22
%24 = getelementptr inbounds float, float* %0, i64 3
store float %23, float* %24
ret void
}