void test_fcmov(void) {
  double a, b;
  long long int eflags, i;
  a = 1.0;
  b = 2.0;
  for (i = 0; i < 4; i++) {
    eflags = 0;
    if (i & 1)
      eflags |= 0x0001;
    if (i & 2)
      eflags |= 0x0040;
    {
      double res;
      asm("pushq %3\n"
          "popfq\n"
          "fcmov"
          "b"
          " %2, %0\n"
          : "=t"(res)
          : "0"(a), "u"(b), "g"((long long int)eflags));
      printf("fcmov%s eflags=0x%04llx-> %f\n", "b", (long long int)eflags, res);
    };
    {
      double res;
      asm("pushq %3\n"
          "popfq\n"
          "fcmov"
          "e"
          " %2, %0\n"
          : "=t"(res)
          : "0"(a), "u"(b), "g"((long long int)eflags));
      printf("fcmov%s eflags=0x%04llx-> %f\n", "e", (long long int)eflags, res);
    };
    {
      double res;
      asm("pushq %3\n"
          "popfq\n"
          "fcmov"
          "be"
          " %2, %0\n"
          : "=t"(res)
          : "0"(a), "u"(b), "g"((long long int)eflags));
      printf("fcmov%s eflags=0x%04llx-> %f\n", "be", (long long int)eflags,
             res);
    };
    {
      double res;
      asm("pushq %3\n"
          "popfq\n"
          "fcmov"
          "nb"
          " %2, %0\n"
          : "=t"(res)
          : "0"(a), "u"(b), "g"((long long int)eflags));
      printf("fcmov%s eflags=0x%04llx-> %f\n", "nb", (long long int)eflags,
             res);
    };
    {
      double res;
      asm("pushq %3\n"
          "popfq\n"
          "fcmov"
          "ne"
          " %2, %0\n"
          : "=t"(res)
          : "0"(a), "u"(b), "g"((long long int)eflags));
      printf("fcmov%s eflags=0x%04llx-> %f\n", "ne", (long long int)eflags,
             res);
    };
    {
      double res;
      asm("pushq %3\n"
          "popfq\n"
          "fcmov"
          "nbe"
          " %2, %0\n"
          : "=t"(res)
          : "0"(a), "u"(b), "g"((long long int)eflags));
      printf("fcmov%s eflags=0x%04llx-> %f\n", "nbe", (long long int)eflags,
             res);
    };
  }
  {
    double res;
    asm("pushq %3\n"
        "popfq\n"
        "fcmov"
        "u"
        " %2, %0\n"
        : "=t"(res)
        : "0"(a), "u"(b), "g"((long long int)0));
    printf("fcmov%s eflags=0x%04llx-> %f\n", "u", (long long int)0, res);
  };
  {
    double res;
    asm("pushq %3\n"
        "popfq\n"
        "fcmov"
        "u"
        " %2, %0\n"
        : "=t"(res)
        : "0"(a), "u"(b), "g"((long long int)0x0004));
    printf("fcmov%s eflags=0x%04llx-> %f\n", "u", (long long int)0x0004, res);
  };
  {
    double res;
    asm("pushq %3\n"
        "popfq\n"
        "fcmov"
        "nu"
        " %2, %0\n"
        : "=t"(res)
        : "0"(a), "u"(b), "g"((long long int)0));
    printf("fcmov%s eflags=0x%04llx-> %f\n", "nu", (long long int)0, res);
  };
  {
    double res;
    asm("pushq %3\n"
        "popfq\n"
        "fcmov"
        "nu"
        " %2, %0\n"
        : "=t"(res)
        : "0"(a), "u"(b), "g"((long long int)0x0004));
    printf("fcmov%s eflags=0x%04llx-> %f\n", "nu", (long long int)0x0004, res);
  };
}


x86 assembly (clang, -O0):
<test_fcmov>:
push   %rbp
mov    %rsp,%rbp
sub    $0x190,%rsp
movsd  0xee5(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0xed0(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movq   $0x0,-0x20(%rbp)
cmpq   $0x4,-0x20(%rbp)
jge    1437 <test_fcmov+0x327>
movq   $0x0,-0x18(%rbp)
mov    -0x20(%rbp),%rax
and    $0x1,%rax
cmp    $0x0,%rax
je     116e <test_fcmov+0x5e>
mov    -0x18(%rbp),%rax
or     $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
and    $0x2,%rax
cmp    $0x0,%rax
je     118c <test_fcmov+0x7c>
mov    -0x18(%rbp),%rax
or     $0x40,%rax
mov    %rax,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm1,-0x180(%rbp)
ff
movsd  %xmm0,-0x188(%rbp)
ff
mov    %rax,-0x178(%rbp)
fldl   -0x180(%rbp)
fldl   -0x188(%rbp)
fxch   %st(1)
push   -0x178(%rbp)
popf
fcmovb %st(1),%st
fstp   %st(1)
fstpl  -0x190(%rbp)
movsd  -0x190(%rbp),%xmm0
ff
movsd  %xmm0,-0x28(%rbp)
mov    -0x18(%rbp),%rdx
movsd  -0x28(%rbp),%xmm0
lea    0xe23(%rip),%rdi
lea    0xe3b(%rip),%rsi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm1,-0x160(%rbp)
ff
movsd  %xmm0,-0x168(%rbp)
ff
mov    %rax,-0x158(%rbp)
fldl   -0x160(%rbp)
fldl   -0x168(%rbp)
fxch   %st(1)
push   -0x158(%rbp)
popf
fcmove %st(1),%st
fstp   %st(1)
fstpl  -0x170(%rbp)
movsd  -0x170(%rbp),%xmm0
ff
movsd  %xmm0,-0x30(%rbp)
mov    -0x18(%rbp),%rdx
movsd  -0x30(%rbp),%xmm0
lea    0xdb4(%rip),%rdi
lea    0xdd3(%rip),%rsi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm1,-0x140(%rbp)
ff
movsd  %xmm0,-0x148(%rbp)
ff
mov    %rax,-0x138(%rbp)
fldl   -0x140(%rbp)
fldl   -0x148(%rbp)
fxch   %st(1)
push   -0x138(%rbp)
popf
fcmovbe %st(1),%st
fstp   %st(1)
fstpl  -0x150(%rbp)
movsd  -0x150(%rbp),%xmm0
ff
movsd  %xmm0,-0x38(%rbp)
mov    -0x18(%rbp),%rdx
movsd  -0x38(%rbp),%xmm0
lea    0xd45(%rip),%rdi
lea    0xd63(%rip),%rsi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm1,-0x120(%rbp)
ff
movsd  %xmm0,-0x128(%rbp)
ff
mov    %rax,-0x118(%rbp)
fldl   -0x120(%rbp)
fldl   -0x128(%rbp)
fxch   %st(1)
push   -0x118(%rbp)
popf
fcmovnb %st(1),%st
fstp   %st(1)
fstpl  -0x130(%rbp)
movsd  -0x130(%rbp),%xmm0
ff
movsd  %xmm0,-0x40(%rbp)
mov    -0x18(%rbp),%rdx
movsd  -0x40(%rbp),%xmm0
lea    0xcd6(%rip),%rdi
lea    0xced(%rip),%rsi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm1,-0x100(%rbp)
ff
movsd  %xmm0,-0x108(%rbp)
ff
mov    %rax,-0xf8(%rbp)
fldl   -0x100(%rbp)
fldl   -0x108(%rbp)
fxch   %st(1)
push   -0xf8(%rbp)
popf
fcmovne %st(1),%st
fstp   %st(1)
fstpl  -0x110(%rbp)
movsd  -0x110(%rbp),%xmm0
ff
movsd  %xmm0,-0x48(%rbp)
mov    -0x18(%rbp),%rdx
movsd  -0x48(%rbp),%xmm0
lea    0xc67(%rip),%rdi
lea    0xc81(%rip),%rsi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm1,-0xe0(%rbp)
ff
movsd  %xmm0,-0xe8(%rbp)
ff
mov    %rax,-0xd8(%rbp)
fldl   -0xe0(%rbp)
fldl   -0xe8(%rbp)
fxch   %st(1)
push   -0xd8(%rbp)
popf
fcmovnbe %st(1),%st
fstp   %st(1)
fstpl  -0xf0(%rbp)
movsd  -0xf0(%rbp),%xmm0
ff
movsd  %xmm0,-0x50(%rbp)
mov    -0x18(%rbp),%rdx
movsd  -0x50(%rbp),%xmm0
lea    0xbf8(%rip),%rdi
lea    0xc15(%rip),%rsi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    113d <test_fcmov+0x2d>
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
movsd  %xmm1,-0xc0(%rbp)
ff
movsd  %xmm0,-0xc8(%rbp)
ff
fldl   -0xc0(%rbp)
fldl   -0xc8(%rbp)
fxch   %st(1)
push   $0x0
popf
fcmovu %st(1),%st
fstp   %st(1)
fstpl  -0xd0(%rbp)
movsd  -0xd0(%rbp),%xmm0
ff
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
lea    0xb8b(%rip),%rdi
lea    0xbad(%rip),%rsi
xor    %eax,%eax
mov    %eax,%edx
mov    $0x1,%al
call   1030 <printf@plt>
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
movsd  %xmm1,-0xa8(%rbp)
ff
movsd  %xmm0,-0xb0(%rbp)
ff
fldl   -0xa8(%rbp)
fldl   -0xb0(%rbp)
fxch   %st(1)
push   $0x4
popf
fcmovu %st(1),%st
fstp   %st(1)
fstpl  -0xb8(%rbp)
movsd  -0xb8(%rbp),%xmm0
ff
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
lea    0xb2b(%rip),%rdi
lea    0xb4d(%rip),%rsi
mov    $0x4,%edx
mov    $0x1,%al
call   1030 <printf@plt>
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
movsd  %xmm1,-0x90(%rbp)
ff
movsd  %xmm0,-0x98(%rbp)
ff
fldl   -0x90(%rbp)
fldl   -0x98(%rbp)
fxch   %st(1)
push   $0x0
popf
fcmovnu %st(1),%st
fstp   %st(1)
fstpl  -0xa0(%rbp)
movsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm0
lea    0xaca(%rip),%rdi
lea    0xaeb(%rip),%rsi
xor    %eax,%eax
mov    %eax,%edx
mov    $0x1,%al
call   1030 <printf@plt>
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
movsd  %xmm1,-0x78(%rbp)
movsd  %xmm0,-0x80(%rbp)
fldl   -0x78(%rbp)
fldl   -0x80(%rbp)
fxch   %st(1)
push   $0x4
popf
fcmovnu %st(1),%st
fstp   %st(1)
fstpl  -0x88(%rbp)
movsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
lea    0xa76(%rip),%rdi
lea    0xa97(%rip),%rsi
mov    $0x4,%edx
mov    $0x1,%al
call   1030 <printf@plt>
add    $0x190,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_fcmov>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x98,%rsp
xor    %r12d,%r12d
fld1
fstpt  0xc(%rsp)
flds   0xed0(%rip)
fstpt  (%rsp)
lea    0xeca(%rip),%rbx
lea    0xee4(%rip),%rbp
lea    0xee0(%rip),%r14
xor    %r13d,%r13d
nopl   0x0(%rax,%rax,1)
mov    %r13d,%eax
and    $0x1,%eax
mov    %r12d,%r15d
and    $0x40,%r15d
or     %rax,%r15
mov    %r15,0x90(%rsp)
fldt   (%rsp)
fldt   0xc(%rsp)
push   0x90(%rsp)
popf
fcmovb %st(1),%st
fstp   %st(1)
fstpl  0x60(%rsp)
movsd  0x60(%rsp),%xmm0
mov    %rbx,%rdi
lea    0xe94(%rip),%rsi
mov    %r15,%rdx
mov    $0x1,%al
call   1030 <printf@plt>
mov    %r15,0x88(%rsp)
fldt   (%rsp)
fldt   0xc(%rsp)
push   0x88(%rsp)
popf
fcmove %st(1),%st
fstp   %st(1)
fstpl  0x58(%rsp)
movsd  0x58(%rsp),%xmm0
mov    %rbx,%rdi
lea    0xe62(%rip),%rsi
mov    %r15,%rdx
mov    $0x1,%al
call   1030 <printf@plt>
mov    %r15,0x80(%rsp)
fldt   (%rsp)
fldt   0xc(%rsp)
push   0x80(%rsp)
popf
fcmovbe %st(1),%st
fstp   %st(1)
fstpl  0x50(%rsp)
movsd  0x50(%rsp),%xmm0
mov    %rbx,%rdi
lea    0xe28(%rip),%rsi
mov    %r15,%rdx
mov    $0x1,%al
call   1030 <printf@plt>
mov    %r15,0x78(%rsp)
fldt   (%rsp)
fldt   0xc(%rsp)
push   0x78(%rsp)
popf
fcmovnb %st(1),%st
fstp   %st(1)
fstpl  0x48(%rsp)
movsd  0x48(%rsp),%xmm0
mov    %rbx,%rdi
lea    0xdee(%rip),%rsi
mov    %r15,%rdx
mov    $0x1,%al
call   1030 <printf@plt>
mov    %r15,0x70(%rsp)
fldt   (%rsp)
fldt   0xc(%rsp)
push   0x70(%rsp)
popf
fcmovne %st(1),%st
fstp   %st(1)
fstpl  0x40(%rsp)
movsd  0x40(%rsp),%xmm0
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %r15,%rdx
mov    $0x1,%al
call   1030 <printf@plt>
mov    %r15,0x68(%rsp)
fldt   (%rsp)
fldt   0xc(%rsp)
push   0x68(%rsp)
popf
fcmovnbe %st(1),%st
fstp   %st(1)
fstpl  0x38(%rsp)
movsd  0x38(%rsp),%xmm0
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
mov    $0x1,%al
call   1030 <printf@plt>
add    $0x1,%r13
add    $0x20,%r12
cmp    $0x4,%r13
jne    1150 <test_fcmov+0x40>
flds   0xd4c(%rip)
fld    %st(0)
fstpt  (%rsp)
fldt   0xc(%rsp)
push   $0x0
popf
fcmovu %st(1),%st
fstp   %st(1)
fstpl  0x30(%rsp)
movsd  0x30(%rsp),%xmm0
lea    0xd2f(%rip),%rbx
lea    0xd51(%rip),%rbp
mov    %rbx,%rdi
mov    %rbp,%rsi
xor    %edx,%edx
mov    $0x1,%al
call   1030 <printf@plt>
fldt   (%rsp)
fldt   0xc(%rsp)
push   $0x4
popf
fcmovu %st(1),%st
fstp   %st(1)
fstpl  0x28(%rsp)
movsd  0x28(%rsp),%xmm0
mov    $0x4,%edx
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0x1,%al
call   1030 <printf@plt>
fldt   (%rsp)
fldt   0xc(%rsp)
push   $0x0
popf
fcmovnu %st(1),%st
fstp   %st(1)
fstpl  0x20(%rsp)
movsd  0x20(%rsp),%xmm0
lea    0xcf8(%rip),%rbp
mov    %rbx,%rdi
mov    %rbp,%rsi
xor    %edx,%edx
mov    $0x1,%al
call   1030 <printf@plt>
fldt   (%rsp)
fldt   0xc(%rsp)
push   $0x4
popf
fcmovnu %st(1),%st
fstp   %st(1)
fstpl  0x18(%rsp)
movsd  0x18(%rsp),%xmm0
mov    $0x4,%edx
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0x1,%al
add    $0x98,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"fcmov%s eflags=0x%04llx-> %f\0A\00"
@.str.1 = [2 x i8] c"b\00"
@.str.2 = [2 x i8] c"e\00"
@.str.3 = [3 x i8] c"be\00"
@.str.4 = [3 x i8] c"nb\00"
@.str.5 = [3 x i8] c"ne\00"
@.str.6 = [4 x i8] c"nbe\00"
@.str.7 = [2 x i8] c"u\00"
@.str.8 = [3 x i8] c"nu\00"
define void @test_fcmov() {
%1 = alloca double
%2 = alloca double
%3 = alloca i64
%4 = alloca i64
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
store double 1.000000e+00, double* %1
store double 2.000000e+00, double* %2
store i64 0, i64* %4
br label %15
15: ; preds = %75, %0
%16 = load i64, i64* %4
%17 = icmp slt i64 %16, 4
br i1 %17, label %18, label %78
18: ; preds = %15
store i64 0, i64* %3
%19 = load i64, i64* %4
%20 = and i64 %19, 1
%21 = icmp ne i64 %20, 0
br i1 %21, label %22, label %25
22: ; preds = %18
%23 = load i64, i64* %3
%24 = or i64 %23, 1
store i64 %24, i64* %3
br label %25
25: ; preds = %22, %18
%26 = load i64, i64* %4
%27 = and i64 %26, 2
%28 = icmp ne i64 %27, 0
br i1 %28, label %29, label %32
29: ; preds = %25
%30 = load i64, i64* %3
%31 = or i64 %30, 64
store i64 %31, i64* %3
br label %32
32: ; preds = %29, %25
%33 = load double, double* %1
%34 = load double, double* %2
%35 = load i64, i64* %3
%36 = call double asm "pushq $3\0Apopfq\0Afcmovb $2, $0\0A", "={st},0,{st(1)},imr,~{dirflag},~{fpsr},~{flags}"(double %33, double %34, i64 %35)
store double %36, double* %5
%37 = load i64, i64* %3
%38 = load double, double* %5
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i64 %37, double %38)
%40 = load double, double* %1
%41 = load double, double* %2
%42 = load i64, i64* %3
%43 = call double asm "pushq $3\0Apopfq\0Afcmove $2, $0\0A", "={st},0,{st(1)},imr,~{dirflag},~{fpsr},~{flags}"(double %40, double %41, i64 %42)
store double %43, double* %6
%44 = load i64, i64* %3
%45 = load double, double* %6
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i64 %44, double %45)
%47 = load double, double* %1
%48 = load double, double* %2
%49 = load i64, i64* %3
%50 = call double asm "pushq $3\0Apopfq\0Afcmovbe $2, $0\0A", "={st},0,{st(1)},imr,~{dirflag},~{fpsr},~{flags}"(double %47, double %48, i64 %49)
store double %50, double* %7
%51 = load i64, i64* %3
%52 = load double, double* %7
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i64 %51, double %52)
%54 = load double, double* %1
%55 = load double, double* %2
%56 = load i64, i64* %3
%57 = call double asm "pushq $3\0Apopfq\0Afcmovnb $2, $0\0A", "={st},0,{st(1)},imr,~{dirflag},~{fpsr},~{flags}"(double %54, double %55, i64 %56)
store double %57, double* %8
%58 = load i64, i64* %3
%59 = load double, double* %8
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i64 %58, double %59)
%61 = load double, double* %1
%62 = load double, double* %2
%63 = load i64, i64* %3
%64 = call double asm "pushq $3\0Apopfq\0Afcmovne $2, $0\0A", "={st},0,{st(1)},imr,~{dirflag},~{fpsr},~{flags}"(double %61, double %62, i64 %63)
store double %64, double* %9
%65 = load i64, i64* %3
%66 = load double, double* %9
%67 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i64 %65, double %66)
%68 = load double, double* %1
%69 = load double, double* %2
%70 = load i64, i64* %3
%71 = call double asm "pushq $3\0Apopfq\0Afcmovnbe $2, $0\0A", "={st},0,{st(1)},imr,~{dirflag},~{fpsr},~{flags}"(double %68, double %69, i64 %70)
store double %71, double* %10
%72 = load i64, i64* %3
%73 = load double, double* %10
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i64 %72, double %73)
br label %75
75: ; preds = %32
%76 = load i64, i64* %4
%77 = add nsw i64 %76, 1
store i64 %77, i64* %4
br label %15
78: ; preds = %15
%79 = load double, double* %1
%80 = load double, double* %2
%81 = call double asm "pushq $3\0Apopfq\0Afcmovu $2, $0\0A", "={st},0,{st(1)},imr,~{dirflag},~{fpsr},~{flags}"(double %79, double %80, i64 0)
store double %81, double* %11
%82 = load double, double* %11
%83 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0), i64 0, double %82)
%84 = load double, double* %1
%85 = load double, double* %2
%86 = call double asm "pushq $3\0Apopfq\0Afcmovu $2, $0\0A", "={st},0,{st(1)},imr,~{dirflag},~{fpsr},~{flags}"(double %84, double %85, i64 4)
store double %86, double* %12
%87 = load double, double* %12
%88 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0), i64 4, double %87)
%89 = load double, double* %1
%90 = load double, double* %2
%91 = call double asm "pushq $3\0Apopfq\0Afcmovnu $2, $0\0A", "={st},0,{st(1)},imr,~{dirflag},~{fpsr},~{flags}"(double %89, double %90, i64 0)
store double %91, double* %13
%92 = load double, double* %13
%93 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i64 0, double %92)
%94 = load double, double* %1
%95 = load double, double* %2
%96 = call double asm "pushq $3\0Apopfq\0Afcmovnu $2, $0\0A", "={st},0,{st(1)},imr,~{dirflag},~{fpsr},~{flags}"(double %94, double %95, i64 4)
store double %96, double* %14
%97 = load double, double* %14
%98 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i64 4, double %97)
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"fcmov%s eflags=0x%04llx-> %f\0A\00"
@.str.1 = [2 x i8] c"b\00"
@.str.2 = [2 x i8] c"e\00"
@.str.3 = [3 x i8] c"be\00"
@.str.4 = [3 x i8] c"nb\00"
@.str.5 = [3 x i8] c"ne\00"
@.str.6 = [4 x i8] c"nbe\00"
@.str.7 = [2 x i8] c"u\00"
@.str.8 = [3 x i8] c"nu\00"
define void @test_fcmov() {
br label %1
1: ; preds = %0, %1
%2 = phi i64 [ 0, %0 ], [ %19, %1 ]
%3 = and i64 %2, 1
%4 = shl i64 %2, 5
%5 = and i64 %4, 64
%6 = or i64 %5, %3
%7 = tail call double asm "pushq $3\0Apopfq\0Afcmovb $2, $0\0A", "={st},0,{st(1)},imr,~{dirflag},~{fpsr},~{flags}"(double 1.000000e+00, double 2.000000e+00, i64 %6)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i64 %6, double %7)
%9 = tail call double asm "pushq $3\0Apopfq\0Afcmove $2, $0\0A", "={st},0,{st(1)},imr,~{dirflag},~{fpsr},~{flags}"(double 1.000000e+00, double 2.000000e+00, i64 %6)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i64 %6, double %9)
%11 = tail call double asm "pushq $3\0Apopfq\0Afcmovbe $2, $0\0A", "={st},0,{st(1)},imr,~{dirflag},~{fpsr},~{flags}"(double 1.000000e+00, double 2.000000e+00, i64 %6)
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i64 %6, double %11)
%13 = tail call double asm "pushq $3\0Apopfq\0Afcmovnb $2, $0\0A", "={st},0,{st(1)},imr,~{dirflag},~{fpsr},~{flags}"(double 1.000000e+00, double 2.000000e+00, i64 %6)
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i64 %6, double %13)
%15 = tail call double asm "pushq $3\0Apopfq\0Afcmovne $2, $0\0A", "={st},0,{st(1)},imr,~{dirflag},~{fpsr},~{flags}"(double 1.000000e+00, double 2.000000e+00, i64 %6)
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i64 %6, double %15)
%17 = tail call double asm "pushq $3\0Apopfq\0Afcmovnbe $2, $0\0A", "={st},0,{st(1)},imr,~{dirflag},~{fpsr},~{flags}"(double 1.000000e+00, double 2.000000e+00, i64 %6)
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i64 %6, double %17)
%19 = add nuw nsw i64 %2, 1
%20 = icmp eq i64 %19, 4
br i1 %20, label %21, label %1
21: ; preds = %1
%22 = tail call double asm "pushq $3\0Apopfq\0Afcmovu $2, $0\0A", "={st},0,{st(1)},imr,~{dirflag},~{fpsr},~{flags}"(double 1.000000e+00, double 2.000000e+00, i64 0)
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0), i64 0, double %22)
%24 = tail call double asm "pushq $3\0Apopfq\0Afcmovu $2, $0\0A", "={st},0,{st(1)},imr,~{dirflag},~{fpsr},~{flags}"(double 1.000000e+00, double 2.000000e+00, i64 4)
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0), i64 4, double %24)
%26 = tail call double asm "pushq $3\0Apopfq\0Afcmovnu $2, $0\0A", "={st},0,{st(1)},imr,~{dirflag},~{fpsr},~{flags}"(double 1.000000e+00, double 2.000000e+00, i64 0)
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i64 0, double %26)
%28 = tail call double asm "pushq $3\0Apopfq\0Afcmovnu $2, $0\0A", "={st},0,{st(1)},imr,~{dirflag},~{fpsr},~{flags}"(double 1.000000e+00, double 2.000000e+00, i64 4)
%29 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i64 4, double %28)
ret void
}