1
; RUN: llc < %s -march=x86-64 | FileCheck %s
3
; Convert oeq and une to ole/oge/ule/uge when comparing with infinity
4
; and negative infinity, because those are more efficient on x86.
9
define float @oeq_inff(float %x, float %y) nounwind readonly {
10
%t0 = fcmp oeq float %x, 0x7FF0000000000000
11
%t1 = select i1 %t0, float 1.0, float %y
18
define double @oeq_inf(double %x, double %y) nounwind readonly {
19
%t0 = fcmp oeq double %x, 0x7FF0000000000000
20
%t1 = select i1 %t0, double 1.0, double %y
27
define float @une_inff(float %x, float %y) nounwind readonly {
28
%t0 = fcmp une float %x, 0x7FF0000000000000
29
%t1 = select i1 %t0, float 1.0, float %y
36
define double @une_inf(double %x, double %y) nounwind readonly {
37
%t0 = fcmp une double %x, 0x7FF0000000000000
38
%t1 = select i1 %t0, double 1.0, double %y
42
; CHECK: oeq_neg_inff:
45
define float @oeq_neg_inff(float %x, float %y) nounwind readonly {
46
%t0 = fcmp oeq float %x, 0xFFF0000000000000
47
%t1 = select i1 %t0, float 1.0, float %y
54
define double @oeq_neg_inf(double %x, double %y) nounwind readonly {
55
%t0 = fcmp oeq double %x, 0xFFF0000000000000
56
%t1 = select i1 %t0, double 1.0, double %y
60
; CHECK: une_neg_inff:
63
define float @une_neg_inff(float %x, float %y) nounwind readonly {
64
%t0 = fcmp une float %x, 0xFFF0000000000000
65
%t1 = select i1 %t0, float 1.0, float %y
72
define double @une_neg_inf(double %x, double %y) nounwind readonly {
73
%t0 = fcmp une double %x, 0xFFF0000000000000
74
%t1 = select i1 %t0, double 1.0, double %y