2013-12-11 14:31:04 +00:00
|
|
|
; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=knl --show-mc-encoding | FileCheck %s
|
2013-08-28 11:21:58 +00:00
|
|
|
|
2013-12-22 10:13:18 +00:00
|
|
|
; CHECK-LABEL: test1
|
2013-12-11 14:31:04 +00:00
|
|
|
; CHECK: vucomisd {{.*}}encoding: [0x62
|
2013-08-28 11:21:58 +00:00
|
|
|
define double @test1(double %a, double %b) nounwind {
|
|
|
|
%tobool = fcmp une double %a, %b
|
|
|
|
br i1 %tobool, label %l1, label %l2
|
|
|
|
|
|
|
|
l1:
|
|
|
|
%c = fsub double %a, %b
|
|
|
|
ret double %c
|
|
|
|
l2:
|
|
|
|
%c1 = fadd double %a, %b
|
|
|
|
ret double %c1
|
|
|
|
}
|
|
|
|
|
2013-12-22 10:13:18 +00:00
|
|
|
; CHECK-LABEL: test2
|
2013-12-11 14:31:04 +00:00
|
|
|
; CHECK: vucomiss {{.*}}encoding: [0x62
|
2013-08-28 11:21:58 +00:00
|
|
|
define float @test2(float %a, float %b) nounwind {
|
|
|
|
%tobool = fcmp olt float %a, %b
|
|
|
|
br i1 %tobool, label %l1, label %l2
|
|
|
|
|
|
|
|
l1:
|
|
|
|
%c = fsub float %a, %b
|
|
|
|
ret float %c
|
|
|
|
l2:
|
|
|
|
%c1 = fadd float %a, %b
|
|
|
|
ret float %c1
|
|
|
|
}
|
2013-12-22 10:13:18 +00:00
|
|
|
|
|
|
|
; CHECK-LABEL: test3
|
|
|
|
; CHECK: vcmpeqss
|
|
|
|
; CHECK: kmov
|
|
|
|
; CHECK: ret
|
|
|
|
define i32 @test3(float %a, float %b) {
|
|
|
|
|
|
|
|
%cmp10.i = fcmp oeq float %a, %b
|
|
|
|
%conv11.i = zext i1 %cmp10.i to i32
|
|
|
|
ret i32 %conv11.i
|
|
|
|
}
|