void fft2(_Complex double *Y, _Complex double *X) {
  _Complex double a15, a16;
  a15 = *(X);
  a16 = *((X + 1));
  *(Y) = (a15 + a16);
  *((Y + 1)) = (a15 - a16);
}


x86 assembly (clang, -O0):
<fft2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
movsd  0x8(%rax),%xmm0
movsd  %xmm1,-0x20(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm1
movsd  0x18(%rax),%xmm0
movsd  %xmm1,-0x30(%rbp)
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm3
movsd  -0x28(%rbp),%xmm2
addsd  %xmm3,%xmm1
addsd  %xmm2,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm1,(%rax)
movsd  %xmm0,0x8(%rax)
movsd  -0x20(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm3
movsd  -0x28(%rbp),%xmm2
subsd  %xmm3,%xmm1
subsd  %xmm2,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm1,0x10(%rax)
movsd  %xmm0,0x18(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<fft2>:
movupd (%rsi),%xmm0
movupd 0x10(%rsi),%xmm1
movapd %xmm0,%xmm2
addpd  %xmm1,%xmm2
movupd %xmm2,(%rdi)
subpd  %xmm1,%xmm0
movupd %xmm0,0x10(%rdi)
ret

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

LLVM IR (-O2):
define void @fft2({ double, double }* nocapture writeonly %0, { double, double }* nocapture %1) {
%3 = bitcast { double, double }* %1 to <2 x double>*
%4 = load <2 x double>, <2 x double>* %3
%5 = getelementptr inbounds { double, double }, { double, double }* %1, i64 1, i32 0
%6 = bitcast double* %5 to <2 x double>*
%7 = load <2 x double>, <2 x double>* %6
%8 = fadd <2 x double> %4, %7
%9 = bitcast { double, double }* %0 to <2 x double>*
store <2 x double> %8, <2 x double>* %9
%10 = fsub <2 x double> %4, %7
%11 = getelementptr inbounds { double, double }, { double, double }* %0, i64 1, i32 0
%12 = bitcast double* %11 to <2 x double>*
store <2 x double> %10, <2 x double>* %12
ret void
}