brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.2 KiB · 5beec4d Raw
127 lines · plain
1; RUN: llc < %s -mtriple=x86_64-- | FileCheck %s2 3; Convert oeq and une to ole/oge/ule/uge when comparing with infinity4; and negative infinity, because those are more efficient on x86.5 6declare void @f() nounwind7 8; CHECK-LABEL: oeq_inff:9; CHECK: ucomiss10; CHECK: jb11define void @oeq_inff(float %x) nounwind {12  %t0 = fcmp oeq float %x, 0x7FF000000000000013  br i1 %t0, label %true, label %false14 15true:16  call void @f() nounwind17  br label %false18 19false:20  ret void21}22 23; CHECK-LABEL: oeq_inf:24; CHECK: ucomisd25; CHECK: jb26define void @oeq_inf(double %x) nounwind {27  %t0 = fcmp oeq double %x, 0x7FF000000000000028  br i1 %t0, label %true, label %false29 30true:31  call void @f() nounwind32  br label %false33 34false:35  ret void36}37 38; CHECK-LABEL: une_inff:39; CHECK: ucomiss40; CHECK: jae41define void @une_inff(float %x) nounwind {42  %t0 = fcmp une float %x, 0x7FF000000000000043  br i1 %t0, label %true, label %false44 45true:46  call void @f() nounwind47  br label %false48 49false:50  ret void51}52 53; CHECK-LABEL: une_inf:54; CHECK: ucomisd55; CHECK: jae56define void @une_inf(double %x) nounwind {57  %t0 = fcmp une double %x, 0x7FF000000000000058  br i1 %t0, label %true, label %false59 60true:61  call void @f() nounwind62  br label %false63 64false:65  ret void66}67 68; CHECK-LABEL: oeq_neg_inff:69; CHECK: ucomiss70; CHECK: jb71define void @oeq_neg_inff(float %x) nounwind {72  %t0 = fcmp oeq float %x, 0xFFF000000000000073  br i1 %t0, label %true, label %false74 75true:76  call void @f() nounwind77  br label %false78 79false:80  ret void81}82 83; CHECK-LABEL: oeq_neg_inf:84; CHECK: ucomisd85; CHECK: jb86define void @oeq_neg_inf(double %x) nounwind {87  %t0 = fcmp oeq double %x, 0xFFF000000000000088  br i1 %t0, label %true, label %false89 90true:91  call void @f() nounwind92  br label %false93 94false:95  ret void96}97 98; CHECK-LABEL: une_neg_inff:99; CHECK: ucomiss100; CHECK: jae101define void @une_neg_inff(float %x) nounwind {102  %t0 = fcmp une float %x, 0xFFF0000000000000103  br i1 %t0, label %true, label %false104 105true:106  call void @f() nounwind107  br label %false108 109false:110  ret void111}112 113; CHECK-LABEL: une_neg_inf:114; CHECK: ucomisd115; CHECK: jae116define void @une_neg_inf(double %x) nounwind {117  %t0 = fcmp une double %x, 0xFFF0000000000000118  br i1 %t0, label %true, label %false119 120true:121  call void @f() nounwind122  br label %false123 124false:125  ret void126}127