void gb_float33_identity(float m[3][3]) {
  m[0][0] = 1;
  m[0][1] = 0;
  m[0][2] = 0;
  m[1][0] = 0;
  m[1][1] = 1;
  m[1][2] = 0;
  m[2][0] = 0;
  m[2][1] = 0;
  m[2][2] = 1;
}


x86 assembly (clang, -O0):
<gb_float33_identity>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  0xeec(%rip),%xmm0
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x4(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0xc(%rax)
mov    -0x8(%rbp),%rax
movss  0xeb8(%rip),%xmm0
movss  %xmm0,0x10(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x14(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x18(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x1c(%rax)
mov    -0x8(%rbp),%rax
movss  0xe83(%rip),%xmm0
movss  %xmm0,0x20(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<gb_float33_identity>:
movss  0xef8(%rip),%xmm0
movups %xmm0,(%rdi)
movups %xmm0,0x10(%rdi)
movl   $0x3f800000,0x20(%rdi)
ret

LLVM IR (-O0):
define void @gb_float33_identity([3 x float]* %0) {
%2 = alloca [3 x float]*
store [3 x float]* %0, [3 x float]** %2
%3 = load [3 x float]*, [3 x float]** %2
%4 = getelementptr inbounds [3 x float], [3 x float]* %3, i64 0
%5 = getelementptr inbounds [3 x float], [3 x float]* %4, i64 0, i64 0
store float 1.000000e+00, float* %5
%6 = load [3 x float]*, [3 x float]** %2
%7 = getelementptr inbounds [3 x float], [3 x float]* %6, i64 0
%8 = getelementptr inbounds [3 x float], [3 x float]* %7, i64 0, i64 1
store float 0.000000e+00, float* %8
%9 = load [3 x float]*, [3 x float]** %2
%10 = getelementptr inbounds [3 x float], [3 x float]* %9, i64 0
%11 = getelementptr inbounds [3 x float], [3 x float]* %10, i64 0, i64 2
store float 0.000000e+00, float* %11
%12 = load [3 x float]*, [3 x float]** %2
%13 = getelementptr inbounds [3 x float], [3 x float]* %12, i64 1
%14 = getelementptr inbounds [3 x float], [3 x float]* %13, i64 0, i64 0
store float 0.000000e+00, float* %14
%15 = load [3 x float]*, [3 x float]** %2
%16 = getelementptr inbounds [3 x float], [3 x float]* %15, i64 1
%17 = getelementptr inbounds [3 x float], [3 x float]* %16, i64 0, i64 1
store float 1.000000e+00, float* %17
%18 = load [3 x float]*, [3 x float]** %2
%19 = getelementptr inbounds [3 x float], [3 x float]* %18, i64 1
%20 = getelementptr inbounds [3 x float], [3 x float]* %19, i64 0, i64 2
store float 0.000000e+00, float* %20
%21 = load [3 x float]*, [3 x float]** %2
%22 = getelementptr inbounds [3 x float], [3 x float]* %21, i64 2
%23 = getelementptr inbounds [3 x float], [3 x float]* %22, i64 0, i64 0
store float 0.000000e+00, float* %23
%24 = load [3 x float]*, [3 x float]** %2
%25 = getelementptr inbounds [3 x float], [3 x float]* %24, i64 2
%26 = getelementptr inbounds [3 x float], [3 x float]* %25, i64 0, i64 1
store float 0.000000e+00, float* %26
%27 = load [3 x float]*, [3 x float]** %2
%28 = getelementptr inbounds [3 x float], [3 x float]* %27, i64 2
%29 = getelementptr inbounds [3 x float], [3 x float]* %28, i64 0, i64 2
store float 1.000000e+00, float* %29
ret void
}

LLVM IR (-O2):
define void @gb_float33_identity([3 x float]* nocapture writeonly %0) {
%2 = bitcast [3 x float]* %0 to <4 x float>*
store <4 x float> <float 1.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00>, <4 x float>* %2
%3 = getelementptr inbounds [3 x float], [3 x float]* %0, i64 1, i64 1
%4 = bitcast float* %3 to <4 x float>*
store <4 x float> <float 1.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00>, <4 x float>* %4
%5 = getelementptr inbounds [3 x float], [3 x float]* %0, i64 2, i64 2
store float 1.000000e+00, float* %5
ret void
}