void identmat(float *matrix) {
  *matrix++ = 1.0;
  *matrix++ = 0.0;
  *matrix++ = 0.0;
  *matrix++ = 0.0;
  *matrix++ = 0.0;
  *matrix++ = 1.0;
  *matrix++ = 0.0;
  *matrix++ = 0.0;
  *matrix++ = 0.0;
  *matrix++ = 0.0;
  *matrix++ = 1.0;
  *matrix++ = 0.0;
  *matrix++ = 0.0;
  *matrix++ = 0.0;
  *matrix++ = 0.0;
  *matrix++ = 1.0;
}


x86 assembly (clang, -O0):
<identmat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x8(%rbp)
movss  0xee1(%rip),%xmm0
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x8(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x8(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x8(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x8(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x8(%rbp)
movss  0xe6e(%rip),%xmm0
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x8(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x8(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x8(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x8(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x8(%rbp)
movss  0xdfb(%rip),%xmm0
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x8(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x8(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x8(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x8(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x8(%rbp)
movss  0xd88(%rip),%xmm0
movss  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<identmat>:
movl   $0x3f800000,(%rdi)
xorps  %xmm0,%xmm0
movups %xmm0,0x4(%rdi)
movl   $0x3f800000,0x14(%rdi)
movups %xmm0,0x18(%rdi)
movl   $0x3f800000,0x28(%rdi)
movups %xmm0,0x2c(%rdi)
movl   $0x3f800000,0x3c(%rdi)
ret

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

LLVM IR (-O2):
define void @identmat(float* nocapture writeonly %0) {
%2 = getelementptr inbounds float, float* %0, i64 1
store float 1.000000e+00, float* %0
%3 = getelementptr inbounds float, float* %0, i64 5
%4 = getelementptr inbounds float, float* %0, i64 6
%5 = bitcast float* %2 to i8*
store float 1.000000e+00, float* %3
%6 = getelementptr inbounds float, float* %0, i64 10
%7 = getelementptr inbounds float, float* %0, i64 11
%8 = bitcast float* %4 to i8*
store float 1.000000e+00, float* %6
%9 = getelementptr inbounds float, float* %0, i64 15
%10 = bitcast float* %7 to i8*
store float 1.000000e+00, float* %9
ret void
}