void test_builtin_cprojf(_Complex float f) {
  if (__builtin_cprojf(f) != __builtin_cprojf(f))
    link_failure_builtin_cprojf();
}


x86 assembly (clang, -O0):
<test_builtin_cprojf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movlpd %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm1
movss  -0x4(%rbp),%xmm0
movss  %xmm1,-0x10(%rbp)
movss  %xmm0,-0xc(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <cprojf@plt>
movlpd %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x30(%rbp)
movss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  -0x8(%rbp),%xmm1
movss  -0x4(%rbp),%xmm0
movss  %xmm1,-0x20(%rbp)
movss  %xmm0,-0x1c(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1040 <cprojf@plt>
movss  -0x30(%rbp),%xmm2
movaps %xmm0,%xmm1
movss  -0x2c(%rbp),%xmm0
movlpd %xmm1,-0x28(%rbp)
movss  -0x28(%rbp),%xmm3
movss  -0x24(%rbp),%xmm1
ucomiss %xmm3,%xmm2
setne  %al
setp   %cl
or     %cl,%al
ucomiss %xmm1,%xmm0
setne  %cl
setp   %dl
or     %dl,%cl
or     %cl,%al
test   $0x1,%al
jne    11c3 <test_builtin_cprojf+0xa3>
jmp    11ca <test_builtin_cprojf+0xaa>
mov    $0x0,%al
call   1030 <link_failure_builtin_cprojf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_builtin_cprojf>:
push   %rax
call   1040 <cprojf@plt>
movaps %xmm0,%xmm1
shufps $0x55,%xmm0,%xmm1
ucomiss %xmm1,%xmm0
jp     1134 <test_builtin_cprojf+0x14>
pop    %rax
ret
xor    %eax,%eax
pop    %rcx
jmp    1030 <link_failure_builtin_cprojf@plt>

LLVM IR (-O0):
define void @test_builtin_cprojf(<2 x float> %0) {
%2 = alloca { float, float }
%3 = alloca { float, float }
%4 = alloca { float, float }
%5 = alloca { float, float }
%6 = alloca { float, float }
%7 = bitcast { float, float }* %2 to <2 x float>*
store <2 x float> %0, <2 x float>* %7
%8 = getelementptr inbounds { float, float }, { float, float }* %2, i32 0, i32 0
%9 = load float, float* %8
%10 = getelementptr inbounds { float, float }, { float, float }* %2, i32 0, i32 1
%11 = load float, float* %10
%12 = getelementptr inbounds { float, float }, { float, float }* %3, i32 0, i32 0
%13 = getelementptr inbounds { float, float }, { float, float }* %3, i32 0, i32 1
store float %9, float* %12
store float %11, float* %13
%14 = bitcast { float, float }* %3 to <2 x float>*
%15 = load <2 x float>, <2 x float>* %14
%16 = call <2 x float> @cprojf(<2 x float> %15)
%17 = bitcast { float, float }* %4 to <2 x float>*
store <2 x float> %16, <2 x float>* %17
%18 = getelementptr inbounds { float, float }, { float, float }* %4, i32 0, i32 0
%19 = load float, float* %18
%20 = getelementptr inbounds { float, float }, { float, float }* %4, i32 0, i32 1
%21 = load float, float* %20
%22 = getelementptr inbounds { float, float }, { float, float }* %2, i32 0, i32 0
%23 = load float, float* %22
%24 = getelementptr inbounds { float, float }, { float, float }* %2, i32 0, i32 1
%25 = load float, float* %24
%26 = getelementptr inbounds { float, float }, { float, float }* %5, i32 0, i32 0
%27 = getelementptr inbounds { float, float }, { float, float }* %5, i32 0, i32 1
store float %23, float* %26
store float %25, float* %27
%28 = bitcast { float, float }* %5 to <2 x float>*
%29 = load <2 x float>, <2 x float>* %28
%30 = call <2 x float> @cprojf(<2 x float> %29)
%31 = bitcast { float, float }* %6 to <2 x float>*
store <2 x float> %30, <2 x float>* %31
%32 = getelementptr inbounds { float, float }, { float, float }* %6, i32 0, i32 0
%33 = load float, float* %32
%34 = getelementptr inbounds { float, float }, { float, float }* %6, i32 0, i32 1
%35 = load float, float* %34
%36 = fcmp une float %19, %33
%37 = fcmp une float %21, %35
%38 = or i1 %36, %37
br i1 %38, label %39, label %41
39: ; preds = %1
%40 = call i32 (...) @link_failure_builtin_cprojf()
br label %41
41: ; preds = %39, %1
ret void
}

LLVM IR (-O2):
define void @test_builtin_cprojf(<2 x float> %0) {
%2 = tail call <2 x float> @cprojf(<2 x float> %0)
%3 = extractelement <2 x float> %2, i64 0
%4 = extractelement <2 x float> %2, i64 1
%5 = fcmp uno float %3, %4
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = tail call i32 (...) @link_failure_builtin_cprojf()
br label %8
8: ; preds = %6, %1
ret void
}