void yxz_to_linear(float *yxz) {
  const float Y = yxz[0];
  const float X = yxz[1];
  const float Z = yxz[2];
  yxz[2] = 3.240479f * X - 1.53715f * Y - 0.498535f * Z;
  yxz[1] = -0.969256f * X + 1.875991f * Y + 0.041556f * Z;
  yxz[0] = 0.055648f * X - 0.204043f * Y + 1.057311f * Z;
}


x86 assembly (clang, -O0):
<yxz_to_linear>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
movss  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x10(%rbp),%xmm1
movss  0xee2(%rip),%xmm0
mulss  -0xc(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  0xec4(%rip),%xmm2
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  -0x14(%rbp),%xmm0
movss  0xeab(%rip),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x8(%rax)
movss  -0x10(%rbp),%xmm1
movss  0xe89(%rip),%xmm0
mulss  -0xc(%rbp),%xmm0
movss  0xe78(%rip),%xmm2
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  -0x14(%rbp),%xmm0
movss  0xe5f(%rip),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x4(%rax)
movss  -0x10(%rbp),%xmm1
movss  0xe3d(%rip),%xmm0
mulss  -0xc(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  0xe1f(%rip),%xmm2
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  -0x14(%rbp),%xmm0
movss  0xe06(%rip),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<yxz_to_linear>:
movss  (%rdi),%xmm2
movss  0x4(%rdi),%xmm0
movss  0x8(%rdi),%xmm1
movss  0xeea(%rip),%xmm3
mulss  %xmm2,%xmm3
movss  0xee2(%rip),%xmm4
mulss  %xmm0,%xmm4
addss  %xmm3,%xmm4
movss  0xed6(%rip),%xmm3
mulss  %xmm1,%xmm3
addss  %xmm4,%xmm3
movss  %xmm3,0x8(%rdi)
movss  0xec5(%rip),%xmm3
mulss  %xmm2,%xmm3
movss  0xebd(%rip),%xmm4
mulss  %xmm0,%xmm4
addss  %xmm3,%xmm4
movss  0xeb1(%rip),%xmm3
mulss  %xmm1,%xmm3
addss  %xmm4,%xmm3
mulss  0xea5(%rip),%xmm2
movss  %xmm3,0x4(%rdi)
mulss  0xe9c(%rip),%xmm0
addss  %xmm2,%xmm0
mulss  0xe94(%rip),%xmm1
addss  %xmm0,%xmm1
movss  %xmm1,(%rdi)
ret

LLVM IR (-O0):
define void @yxz_to_linear(float* %0) {
%2 = alloca float*
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float* %0, float** %2
%6 = load float*, float** %2
%7 = getelementptr inbounds float, float* %6, i64 0
%8 = load float, float* %7
store float %8, float* %3
%9 = load float*, float** %2
%10 = getelementptr inbounds float, float* %9, i64 1
%11 = load float, float* %10
store float %11, float* %4
%12 = load float*, float** %2
%13 = getelementptr inbounds float, float* %12, i64 2
%14 = load float, float* %13
store float %14, float* %5
%15 = load float, float* %4
%16 = load float, float* %3
%17 = fmul float 0x3FF8982AA0000000, %16
%18 = fneg float %17
%19 = call float @llvm.fmuladd.f32(float 0x4009EC8040000000, float %15, float %18)
%20 = load float, float* %5
%21 = call float @llvm.fmuladd.f32(float 0xBFDFE7FF60000000, float %20, float %19)
%22 = load float*, float** %2
%23 = getelementptr inbounds float, float* %22, i64 2
store float %21, float* %23
%24 = load float, float* %4
%25 = load float, float* %3
%26 = fmul float 0x3FFE040F20000000, %25
%27 = call float @llvm.fmuladd.f32(float 0xBFEF042520000000, float %24, float %26)
%28 = load float, float* %5
%29 = call float @llvm.fmuladd.f32(float 0x3FA546D400000000, float %28, float %27)
%30 = load float*, float** %2
%31 = getelementptr inbounds float, float* %30, i64 1
store float %29, float* %31
%32 = load float, float* %4
%33 = load float, float* %3
%34 = fmul float 0x3FCA1E14C0000000, %33
%35 = fneg float %34
%36 = call float @llvm.fmuladd.f32(float 0x3FAC7DE500000000, float %32, float %35)
%37 = load float, float* %5
%38 = call float @llvm.fmuladd.f32(float 0x3FF0EABF00000000, float %37, float %36)
%39 = load float*, float** %2
%40 = getelementptr inbounds float, float* %39, i64 0
store float %38, float* %40
ret void
}

LLVM IR (-O2):
define void @yxz_to_linear(float* nocapture %0) {
%2 = load float, float* %0
%3 = getelementptr inbounds float, float* %0, i64 1
%4 = load float, float* %3
%5 = getelementptr inbounds float, float* %0, i64 2
%6 = load float, float* %5
%7 = fmul float %2, 0xBFF8982AA0000000
%8 = tail call float @llvm.fmuladd.f32(float %4, float 0x4009EC8040000000, float %7)
%9 = tail call float @llvm.fmuladd.f32(float %6, float 0xBFDFE7FF60000000, float %8)
store float %9, float* %5
%10 = fmul float %2, 0x3FFE040F20000000
%11 = tail call float @llvm.fmuladd.f32(float %4, float 0xBFEF042520000000, float %10)
%12 = tail call float @llvm.fmuladd.f32(float %6, float 0x3FA546D400000000, float %11)
store float %12, float* %3
%13 = fmul float %2, 0xBFCA1E14C0000000
%14 = tail call float @llvm.fmuladd.f32(float %4, float 0x3FAC7DE500000000, float %13)
%15 = tail call float @llvm.fmuladd.f32(float %6, float 0x3FF0EABF00000000, float %14)
store float %15, float* %0
ret void
}