@@ -612,7 +612,7 @@ static SILValue constantFoldCompareFloat(BuiltinInst *BI, BuiltinValueKind ID) {
612612 }
613613 }
614614
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
616616 if (match (BI,
617617 m_CombineOr (
618618 // Inf > x
@@ -627,12 +627,6 @@ static SILValue constantFoldCompareFloat(BuiltinInst *BI, BuiltinValueKind ID) {
627627 // x <= Inf
628628 m_BuiltinInst (BuiltinValueKind::FCMP_OLE,
629629 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)),
636630 // Inf > x
637631 m_BuiltinInst (BuiltinValueKind::FCMP_UGT,
638632 m_BitCast (m_IntegerLiteralInst (builtinArg)), m_SILValue (Other)),
@@ -644,13 +638,7 @@ static SILValue constantFoldCompareFloat(BuiltinInst *BI, BuiltinValueKind ID) {
644638 m_SILValue (Other), m_BitCast (m_IntegerLiteralInst (builtinArg))),
645639 // x <= Inf
646640 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)))))) {
654642 APInt val = builtinArg->getValue ();
655643 if (hasIEEEFloatPosInfBitRepr (val)) {
656644 // One of the operands is infinity, but unless the other operand is not
@@ -666,7 +654,7 @@ static SILValue constantFoldCompareFloat(BuiltinInst *BI, BuiltinValueKind ID) {
666654 }
667655 }
668656
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
670658 if (match (BI,
671659 m_CombineOr (
672660 // x > Inf
@@ -681,12 +669,6 @@ static SILValue constantFoldCompareFloat(BuiltinInst *BI, BuiltinValueKind ID) {
681669 // Inf <= x
682670 m_BuiltinInst (BuiltinValueKind::FCMP_OLE,
683671 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)),
690672 // x > Inf
691673 m_BuiltinInst (BuiltinValueKind::FCMP_UGT,
692674 m_SILValue (Other), m_BitCast (m_IntegerLiteralInst (builtinArg))),
@@ -698,12 +680,6 @@ static SILValue constantFoldCompareFloat(BuiltinInst *BI, BuiltinValueKind ID) {
698680 m_BitCast (m_IntegerLiteralInst (builtinArg)), m_SILValue (Other)),
699681 // Inf <= x
700682 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,
707683 m_BitCast (m_IntegerLiteralInst (builtinArg)), m_SILValue (Other))))) {
708684 APInt val = builtinArg->getValue ();
709685 if (hasIEEEFloatPosInfBitRepr (val)) {
0 commit comments