void glmMatrixFromVectors3fT(float m[9], const float v1[3], const float v2[3],
                             const float v3[3]) {
  m[0] = v1[0];
  m[3] = v1[1];
  m[6] = v1[2];
  m[1] = v2[0];
  m[4] = v2[1];
  m[7] = v2[2];
  m[2] = v3[0];
  m[5] = v3[1];
  m[8] = v3[2];
}


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

x86 assembly (clang, -O2):
<glmMatrixFromVectors3fT>:
movss  (%rsi),%xmm0
movss  %xmm0,(%rdi)
movss  0x4(%rsi),%xmm0
movss  %xmm0,0xc(%rdi)
movss  0x8(%rsi),%xmm0
movss  %xmm0,0x18(%rdi)
movss  (%rdx),%xmm0
movss  %xmm0,0x4(%rdi)
movss  0x4(%rdx),%xmm0
movss  %xmm0,0x10(%rdi)
movss  0x8(%rdx),%xmm0
movss  %xmm0,0x1c(%rdi)
movss  (%rcx),%xmm0
movss  %xmm0,0x8(%rdi)
movss  0x4(%rcx),%xmm0
movss  %xmm0,0x14(%rdi)
movss  0x8(%rcx),%xmm0
movss  %xmm0,0x20(%rdi)
ret

LLVM IR (-O0):
define void @glmMatrixFromVectors3fT(float* %0, float* %1, float* %2, float* %3) {
%5 = alloca float*
%6 = alloca float*
%7 = alloca float*
%8 = alloca float*
store float* %0, float** %5
store float* %1, float** %6
store float* %2, float** %7
store float* %3, float** %8
%9 = load float*, float** %6
%10 = getelementptr inbounds float, float* %9, i64 0
%11 = load float, float* %10
%12 = load float*, float** %5
%13 = getelementptr inbounds float, float* %12, i64 0
store float %11, float* %13
%14 = load float*, float** %6
%15 = getelementptr inbounds float, float* %14, i64 1
%16 = load float, float* %15
%17 = load float*, float** %5
%18 = getelementptr inbounds float, float* %17, i64 3
store float %16, float* %18
%19 = load float*, float** %6
%20 = getelementptr inbounds float, float* %19, i64 2
%21 = load float, float* %20
%22 = load float*, float** %5
%23 = getelementptr inbounds float, float* %22, i64 6
store float %21, float* %23
%24 = load float*, float** %7
%25 = getelementptr inbounds float, float* %24, i64 0
%26 = load float, float* %25
%27 = load float*, float** %5
%28 = getelementptr inbounds float, float* %27, i64 1
store float %26, float* %28
%29 = load float*, float** %7
%30 = getelementptr inbounds float, float* %29, i64 1
%31 = load float, float* %30
%32 = load float*, float** %5
%33 = getelementptr inbounds float, float* %32, i64 4
store float %31, float* %33
%34 = load float*, float** %7
%35 = getelementptr inbounds float, float* %34, i64 2
%36 = load float, float* %35
%37 = load float*, float** %5
%38 = getelementptr inbounds float, float* %37, i64 7
store float %36, float* %38
%39 = load float*, float** %8
%40 = getelementptr inbounds float, float* %39, i64 0
%41 = load float, float* %40
%42 = load float*, float** %5
%43 = getelementptr inbounds float, float* %42, i64 2
store float %41, float* %43
%44 = load float*, float** %8
%45 = getelementptr inbounds float, float* %44, i64 1
%46 = load float, float* %45
%47 = load float*, float** %5
%48 = getelementptr inbounds float, float* %47, i64 5
store float %46, float* %48
%49 = load float*, float** %8
%50 = getelementptr inbounds float, float* %49, i64 2
%51 = load float, float* %50
%52 = load float*, float** %5
%53 = getelementptr inbounds float, float* %52, i64 8
store float %51, float* %53
ret void
}

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