d5ec2e777ce088b2ee502134fce823d7fea6edb9
[oota-llvm.git] / test / CodeGen / X86 / avx512-cmp.ll
1 ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=knl --show-mc-encoding | FileCheck %s
2
3 ; CHECK-LABEL: test1
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
8
9 l1:
10   %c = fsub double %a, %b
11   ret double %c
12 l2:
13   %c1 = fadd double %a, %b
14   ret double %c1
15 }
16
17 ; CHECK-LABEL: test2
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
22
23 l1:
24   %c = fsub float %a, %b
25   ret float %c
26 l2:
27   %c1 = fadd float %a, %b
28   ret float %c1
29 }
30
31 ; CHECK-LABEL: test3
32 ; CHECK: vcmpeqss
33 ; CHECK: kmov
34 ; CHECK: ret
35 define i32 @test3(float %a, float %b) {
36
37   %cmp10.i = fcmp oeq float %a, %b
38   %conv11.i = zext i1 %cmp10.i to i32
39   ret i32 %conv11.i
40 }