1 ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=knl --show-mc-encoding | FileCheck %s
4 ; CHECK: vucomisd {{.*}}encoding: [0x62
5 define double @test1(double %a, double %b) nounwind {
6 %tobool = fcmp une double %a, %b
7 br i1 %tobool, label %l1, label %l2
10 %c = fsub double %a, %b
13 %c1 = fadd double %a, %b
18 ; CHECK: vucomiss {{.*}}encoding: [0x62
19 define float @test2(float %a, float %b) nounwind {
20 %tobool = fcmp olt float %a, %b
21 br i1 %tobool, label %l1, label %l2
24 %c = fsub float %a, %b
27 %c1 = fadd float %a, %b
35 define i32 @test3(float %a, float %b) {
37 %cmp10.i = fcmp oeq float %a, %b
38 %conv11.i = zext i1 %cmp10.i to i32
44 define float @test5(float %p) #0 {
46 %cmp = fcmp oeq float %p, 0.000000e+00
47 br i1 %cmp, label %return, label %if.end
49 if.end: ; preds = %entry
50 %cmp1 = fcmp ogt float %p, 0.000000e+00
51 %cond = select i1 %cmp1, float 1.000000e+00, float -1.000000e+00
54 return: ; preds = %if.end, %entry
55 %retval.0 = phi float [ %cond, %if.end ], [ %p, %entry ]
63 define i32 @test6(i32 %a, i32 %b) {
64 %cmp = icmp eq i32 %a, %b
65 %res = zext i1 %cmp to i32
73 define i32 @test7(double %x, double %y) #2 {
75 %0 = fcmp one double %x, %y
76 %or = zext i1 %0 to i32
80 define i32 @test8(i32 %a1, i32 %a2, i32 %a3) {
81 %tmp1 = icmp eq i32 %a1, -1
82 %tmp2 = icmp eq i32 %a2, -2147483648
83 %tmp3 = and i1 %tmp1, %tmp2
84 %tmp4 = icmp eq i32 %a3, 0
85 %tmp5 = or i1 %tmp3, %tmp4
86 %res = select i1 %tmp5, i32 1, i32 %a3