@@ -612,7 +612,7 @@ static SILValue constantFoldCompareFloat(BuiltinInst *BI, BuiltinValueKind ID) {
612
612
}
613
613
}
614
614
615
- // Everything is less than, less than equal to or unequal to positive infinity
615
+ // Everything is less than or less than equal to positive infinity
616
616
if (match (BI,
617
617
m_CombineOr (
618
618
// Inf > x
@@ -627,12 +627,6 @@ static SILValue constantFoldCompareFloat(BuiltinInst *BI, BuiltinValueKind ID) {
627
627
// x <= Inf
628
628
m_BuiltinInst (BuiltinValueKind::FCMP_OLE,
629
629
m_SILValue (Other), m_BitCast (m_IntegerLiteralInst (builtinArg))),
630
- // x != Inf
631
- m_BuiltinInst (BuiltinValueKind::FCMP_ONE,
632
- m_SILValue (Other), m_BitCast (m_IntegerLiteralInst (builtinArg))),
633
- // Inf != x
634
- m_BuiltinInst (BuiltinValueKind::FCMP_ONE,
635
- m_BitCast (m_IntegerLiteralInst (builtinArg)), m_SILValue (Other)),
636
630
// Inf > x
637
631
m_BuiltinInst (BuiltinValueKind::FCMP_UGT,
638
632
m_BitCast (m_IntegerLiteralInst (builtinArg)), m_SILValue (Other)),
@@ -644,13 +638,7 @@ static SILValue constantFoldCompareFloat(BuiltinInst *BI, BuiltinValueKind ID) {
644
638
m_SILValue (Other), m_BitCast (m_IntegerLiteralInst (builtinArg))),
645
639
// x <= Inf
646
640
m_BuiltinInst (BuiltinValueKind::FCMP_ULE,
647
- m_SILValue (Other), m_BitCast (m_IntegerLiteralInst (builtinArg))),
648
- // x != Inf
649
- m_BuiltinInst (BuiltinValueKind::FCMP_UNE,
650
- m_SILValue (Other), m_BitCast (m_IntegerLiteralInst (builtinArg))),
651
- // Inf != x
652
- m_BuiltinInst (BuiltinValueKind::FCMP_UNE,
653
- m_BitCast (m_IntegerLiteralInst (builtinArg)), m_SILValue (Other))))) {
641
+ m_SILValue (Other), m_BitCast (m_IntegerLiteralInst (builtinArg)))))) {
654
642
APInt val = builtinArg->getValue ();
655
643
if (hasIEEEFloatPosInfBitRepr (val)) {
656
644
// One of the operands is infinity, but unless the other operand is not
@@ -666,7 +654,7 @@ static SILValue constantFoldCompareFloat(BuiltinInst *BI, BuiltinValueKind ID) {
666
654
}
667
655
}
668
656
669
- // Positive infinity is not less than, less than equal to or equal to anything
657
+ // Positive infinity is not less than or less than equal to anything
670
658
if (match (BI,
671
659
m_CombineOr (
672
660
// x > Inf
@@ -681,12 +669,6 @@ static SILValue constantFoldCompareFloat(BuiltinInst *BI, BuiltinValueKind ID) {
681
669
// Inf <= x
682
670
m_BuiltinInst (BuiltinValueKind::FCMP_OLE,
683
671
m_BitCast (m_IntegerLiteralInst (builtinArg)), m_SILValue (Other)),
684
- // x == Inf
685
- m_BuiltinInst (BuiltinValueKind::FCMP_OEQ,
686
- m_SILValue (Other), m_BitCast (m_IntegerLiteralInst (builtinArg))),
687
- // Inf == x
688
- m_BuiltinInst (BuiltinValueKind::FCMP_OEQ,
689
- m_BitCast (m_IntegerLiteralInst (builtinArg)), m_SILValue (Other)),
690
672
// x > Inf
691
673
m_BuiltinInst (BuiltinValueKind::FCMP_UGT,
692
674
m_SILValue (Other), m_BitCast (m_IntegerLiteralInst (builtinArg))),
@@ -698,12 +680,6 @@ static SILValue constantFoldCompareFloat(BuiltinInst *BI, BuiltinValueKind ID) {
698
680
m_BitCast (m_IntegerLiteralInst (builtinArg)), m_SILValue (Other)),
699
681
// Inf <= x
700
682
m_BuiltinInst (BuiltinValueKind::FCMP_ULE,
701
- m_BitCast (m_IntegerLiteralInst (builtinArg)), m_SILValue (Other)),
702
- // x == Inf
703
- m_BuiltinInst (BuiltinValueKind::FCMP_UEQ,
704
- m_SILValue (Other), m_BitCast (m_IntegerLiteralInst (builtinArg))),
705
- // Inf == x
706
- m_BuiltinInst (BuiltinValueKind::FCMP_UEQ,
707
683
m_BitCast (m_IntegerLiteralInst (builtinArg)), m_SILValue (Other))))) {
708
684
APInt val = builtinArg->getValue ();
709
685
if (hasIEEEFloatPosInfBitRepr (val)) {
0 commit comments