void test_cpowf(_Complex float f1, _Complex float f2) {
  if (cpowf(f1, f2) != cpowf(f1, f2))
    link_failure_cpowf();
}


x86 assembly (clang, -O0):
<test_cpowf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movlpd %xmm0,-0x8(%rbp)
movlpd %xmm1,-0x10(%rbp)
movss  -0x8(%rbp),%xmm3
movss  -0x4(%rbp),%xmm0
movss  -0x10(%rbp),%xmm2
movss  -0xc(%rbp),%xmm1
movss  %xmm3,-0x18(%rbp)
movss  %xmm0,-0x14(%rbp)
movsd  -0x18(%rbp),%xmm0
movss  %xmm2,-0x20(%rbp)
movss  %xmm1,-0x1c(%rbp)
movsd  -0x20(%rbp),%xmm1
call   1040 <cpowf@plt>
movlpd %xmm0,-0x28(%rbp)
movss  -0x28(%rbp),%xmm0
movss  %xmm0,-0x48(%rbp)
movss  -0x24(%rbp),%xmm0
movss  %xmm0,-0x44(%rbp)
movss  -0x8(%rbp),%xmm3
movss  -0x4(%rbp),%xmm0
movss  -0x10(%rbp),%xmm2
movss  -0xc(%rbp),%xmm1
movss  %xmm3,-0x30(%rbp)
movss  %xmm0,-0x2c(%rbp)
movsd  -0x30(%rbp),%xmm0
movss  %xmm2,-0x38(%rbp)
movss  %xmm1,-0x34(%rbp)
movsd  -0x38(%rbp),%xmm1
call   1040 <cpowf@plt>
movss  -0x48(%rbp),%xmm2
movaps %xmm0,%xmm1
movss  -0x44(%rbp),%xmm0
movlpd %xmm1,-0x40(%rbp)
movss  -0x40(%rbp),%xmm3
movss  -0x3c(%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    11fa <test_cpowf+0xda>
jmp    1201 <test_cpowf+0xe1>
mov    $0x0,%al
call   1030 <link_failure_cpowf@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_cpowf>:
sub    $0x38,%rsp
movaps %xmm1,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
call   1040 <cpowf@plt>
movaps %xmm0,(%rsp)
movaps 0x10(%rsp),%xmm0
movaps 0x20(%rsp),%xmm1
call   1040 <cpowf@plt>
movaps (%rsp),%xmm1
ucomiss %xmm0,%xmm1
jne    1163 <test_cpowf+0x43>
jp     1163 <test_cpowf+0x43>
cmpneqps %xmm0,%xmm1
pextrw $0x2,%xmm1,%eax
test   $0x1,%al
jne    1163 <test_cpowf+0x43>
add    $0x38,%rsp
ret
xor    %eax,%eax
add    $0x38,%rsp
jmp    1030 <link_failure_cpowf@plt>

LLVM IR (-O0):
define void @test_cpowf(<2 x float> %0, <2 x float> %1) {
%3 = alloca { float, float }
%4 = alloca { float, float }
%5 = alloca { float, float }
%6 = alloca { float, float }
%7 = alloca { float, float }
%8 = alloca { float, float }
%9 = alloca { float, float }
%10 = alloca { float, float }
%11 = bitcast { float, float }* %3 to <2 x float>*
store <2 x float> %0, <2 x float>* %11
%12 = bitcast { float, float }* %4 to <2 x float>*
store <2 x float> %1, <2 x float>* %12
%13 = getelementptr inbounds { float, float }, { float, float }* %3, i32 0, i32 0
%14 = load float, float* %13
%15 = getelementptr inbounds { float, float }, { float, float }* %3, i32 0, i32 1
%16 = load float, float* %15
%17 = getelementptr inbounds { float, float }, { float, float }* %4, i32 0, i32 0
%18 = load float, float* %17
%19 = getelementptr inbounds { float, float }, { float, float }* %4, i32 0, i32 1
%20 = load float, float* %19
%21 = getelementptr inbounds { float, float }, { float, float }* %5, i32 0, i32 0
%22 = getelementptr inbounds { float, float }, { float, float }* %5, i32 0, i32 1
store float %14, float* %21
store float %16, float* %22
%23 = bitcast { float, float }* %5 to <2 x float>*
%24 = load <2 x float>, <2 x float>* %23
%25 = getelementptr inbounds { float, float }, { float, float }* %6, i32 0, i32 0
%26 = getelementptr inbounds { float, float }, { float, float }* %6, i32 0, i32 1
store float %18, float* %25
store float %20, float* %26
%27 = bitcast { float, float }* %6 to <2 x float>*
%28 = load <2 x float>, <2 x float>* %27
%29 = call <2 x float> @cpowf(<2 x float> %24, <2 x float> %28)
%30 = bitcast { float, float }* %7 to <2 x float>*
store <2 x float> %29, <2 x float>* %30
%31 = getelementptr inbounds { float, float }, { float, float }* %7, i32 0, i32 0
%32 = load float, float* %31
%33 = getelementptr inbounds { float, float }, { float, float }* %7, i32 0, i32 1
%34 = load float, float* %33
%35 = getelementptr inbounds { float, float }, { float, float }* %3, i32 0, i32 0
%36 = load float, float* %35
%37 = getelementptr inbounds { float, float }, { float, float }* %3, i32 0, i32 1
%38 = load float, float* %37
%39 = getelementptr inbounds { float, float }, { float, float }* %4, i32 0, i32 0
%40 = load float, float* %39
%41 = getelementptr inbounds { float, float }, { float, float }* %4, i32 0, i32 1
%42 = load float, float* %41
%43 = getelementptr inbounds { float, float }, { float, float }* %8, i32 0, i32 0
%44 = getelementptr inbounds { float, float }, { float, float }* %8, i32 0, i32 1
store float %36, float* %43
store float %38, float* %44
%45 = bitcast { float, float }* %8 to <2 x float>*
%46 = load <2 x float>, <2 x float>* %45
%47 = getelementptr inbounds { float, float }, { float, float }* %9, i32 0, i32 0
%48 = getelementptr inbounds { float, float }, { float, float }* %9, i32 0, i32 1
store float %40, float* %47
store float %42, float* %48
%49 = bitcast { float, float }* %9 to <2 x float>*
%50 = load <2 x float>, <2 x float>* %49
%51 = call <2 x float> @cpowf(<2 x float> %46, <2 x float> %50)
%52 = bitcast { float, float }* %10 to <2 x float>*
store <2 x float> %51, <2 x float>* %52
%53 = getelementptr inbounds { float, float }, { float, float }* %10, i32 0, i32 0
%54 = load float, float* %53
%55 = getelementptr inbounds { float, float }, { float, float }* %10, i32 0, i32 1
%56 = load float, float* %55
%57 = fcmp une float %32, %54
%58 = fcmp une float %34, %56
%59 = or i1 %57, %58
br i1 %59, label %60, label %62
60: ; preds = %2
%61 = call i32 (...) @link_failure_cpowf()
br label %62
62: ; preds = %60, %2
ret void
}

LLVM IR (-O2):
define void @test_cpowf(<2 x float> %0, <2 x float> %1) {
%3 = tail call <2 x float> @cpowf(<2 x float> %0, <2 x float> %1)
%4 = extractelement <2 x float> %3, i64 0
%5 = tail call <2 x float> @cpowf(<2 x float> %0, <2 x float> %1)
%6 = extractelement <2 x float> %5, i64 0
%7 = fcmp une float %4, %6
%8 = fcmp une <2 x float> %3, %5
%9 = extractelement <2 x i1> %8, i64 1
%10 = or i1 %7, %9
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = tail call i32 (...) @link_failure_cpowf()
br label %13
13: ; preds = %11, %2
ret void
}