Skip to content

Conversation

Kewen12
Copy link
Contributor

@Kewen12 Kewen12 commented May 21, 2025

This reverts commit d00d74b.

The PR breaks our buildbots and blocks downstream merge.

@Kewen12 Kewen12 requested a review from nikic as a code owner May 21, 2025 22:30
Copy link

Thank you for submitting a Pull Request (PR) to the LLVM Project!

This PR will be automatically labeled and the relevant teams will be notified.

If you wish to, you can add reviewers by using the "Reviewers" section on this page.

If this is not working for you, it is probably because you do not have write permissions for the repository. In which case you can instead tag reviewers by name in a comment by using @ followed by their GitHub username.

If you have received no comments on your PR for a week, you can request a review by "ping"ing the PR by adding a comment “Ping”. The common courtesy "ping" rate is once a week. Please remember that you are asking for valuable time from other developers.

If you have further questions, they may be answered by the LLVM GitHub User Guide.

You can also ask questions in a comment on this PR, on the LLVM Discord or on the forums.

@llvmbot llvmbot added llvm:instcombine Covers the InstCombine, InstSimplify and AggressiveInstCombine passes llvm:analysis Includes value tracking, cost tables and constant folding llvm:transforms llvm:adt labels May 21, 2025
@llvmbot
Copy link
Member

llvmbot commented May 21, 2025

@llvm/pr-subscribers-llvm-analysis

@llvm/pr-subscribers-llvm-adt

Author: None (Kewen12)

Changes

This reverts commit d00d74b.

The PR breaks our buildbots and blocks downstream merge.


Patch is 47.40 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/140968.diff

13 Files Affected:

  • (removed) llvm/include/llvm/ADT/GenericFloatingPointPredicateUtils.h (-479)
  • (removed) llvm/include/llvm/Analysis/FloatingPointPredicateUtils.h (-73)
  • (modified) llvm/include/llvm/Analysis/ValueTracking.h (+43)
  • (removed) llvm/include/llvm/CodeGen/MachineFloatingPointPredicateUtils.h (-46)
  • (modified) llvm/lib/Analysis/CMakeLists.txt (-1)
  • (removed) llvm/lib/Analysis/FloatingPointPredicateUtils.cpp (-41)
  • (modified) llvm/lib/Analysis/InstructionSimplify.cpp (-1)
  • (modified) llvm/lib/Analysis/ValueTracking.cpp (+422-2)
  • (modified) llvm/lib/CodeGen/CMakeLists.txt (-1)
  • (modified) llvm/lib/CodeGen/CodeGenPrepare.cpp (-1)
  • (removed) llvm/lib/CodeGen/MachineFloatingPointPredicateUtils.cpp (-48)
  • (modified) llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp (-1)
  • (modified) llvm/unittests/Analysis/ValueTrackingTest.cpp (-1)
diff --git a/llvm/include/llvm/ADT/GenericFloatingPointPredicateUtils.h b/llvm/include/llvm/ADT/GenericFloatingPointPredicateUtils.h
deleted file mode 100644
index 49c5fe0aed6e1..0000000000000
--- a/llvm/include/llvm/ADT/GenericFloatingPointPredicateUtils.h
+++ /dev/null
@@ -1,479 +0,0 @@
-//===- llvm/Support/GenericFloatingPointPredicateUtils.h -----*- C++-*-----===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-///
-/// \file
-/// Utilities for dealing with flags related to floating point properties and
-/// mode controls.
-///
-//===----------------------------------------------------------------------===/
-
-#ifndef LLVM_ADT_GENERICFLOATINGPOINTPREDICATEUTILS_H
-#define LLVM_ADT_GENERICFLOATINGPOINTPREDICATEUTILS_H
-
-#include "llvm/ADT/APFloat.h"
-#include "llvm/ADT/FloatingPointMode.h"
-#include "llvm/IR/Instructions.h"
-#include <optional>
-
-namespace llvm {
-
-template <typename ContextT> class GenericFloatingPointPredicateUtils {
-  using ValueRefT = typename ContextT::ValueRefT;
-  using FunctionT = typename ContextT::FunctionT;
-
-  constexpr static ValueRefT Invalid = {};
-
-private:
-  static DenormalMode queryDenormalMode(const FunctionT &F, ValueRefT Val);
-
-  static bool lookThroughFAbs(const FunctionT &F, ValueRefT LHS,
-                              ValueRefT &Src);
-
-  static std::optional<APFloat> matchConstantFloat(const FunctionT &F,
-                                                   ValueRefT Val);
-
-  /// Return the return value for fcmpImpliesClass for a compare that produces
-  /// an exact class test.
-  static std::tuple<ValueRefT, FPClassTest, FPClassTest>
-  exactClass(ValueRefT V, FPClassTest M) {
-    return {V, M, ~M};
-  }
-
-public:
-  /// Returns a pair of values, which if passed to llvm.is.fpclass, returns the
-  /// same result as an fcmp with the given operands.
-  static std::pair<ValueRefT, FPClassTest>
-  fcmpToClassTest(FCmpInst::Predicate Pred, const FunctionT &F, ValueRefT LHS,
-                  ValueRefT RHS, bool LookThroughSrc) {
-    std::optional<APFloat> ConstRHS = matchConstantFloat(F, RHS);
-    if (!ConstRHS)
-      return {Invalid, fcAllFlags};
-
-    return fcmpToClassTest(Pred, F, LHS, *ConstRHS, LookThroughSrc);
-  }
-
-  static std::pair<ValueRefT, FPClassTest>
-  fcmpToClassTest(FCmpInst::Predicate Pred, const FunctionT &F, ValueRefT LHS,
-                  const APFloat &ConstRHS, bool LookThroughSrc) {
-
-    auto [Src, ClassIfTrue, ClassIfFalse] =
-        fcmpImpliesClass(Pred, F, LHS, ConstRHS, LookThroughSrc);
-
-    if (Src && ClassIfTrue == ~ClassIfFalse)
-      return {Src, ClassIfTrue};
-
-    return {Invalid, fcAllFlags};
-  }
-
-  /// Compute the possible floating-point classes that \p LHS could be based on
-  /// fcmp \Pred \p LHS, \p RHS.
-  ///
-  /// \returns { TestedValue, ClassesIfTrue, ClassesIfFalse }
-  ///
-  /// If the compare returns an exact class test, ClassesIfTrue ==
-  /// ~ClassesIfFalse
-  ///
-  /// This is a less exact version of fcmpToClassTest (e.g. fcmpToClassTest will
-  /// only succeed for a test of x > 0 implies positive, but not x > 1).
-  ///
-  /// If \p LookThroughSrc is true, consider the input value when computing the
-  /// mask. This may look through sign bit operations.
-  ///
-  /// If \p LookThroughSrc is false, ignore the source value (i.e. the first
-  /// pair element will always be LHS.
-  ///
-  static std::tuple<ValueRefT, FPClassTest, FPClassTest>
-  fcmpImpliesClass(CmpInst::Predicate Pred, const FunctionT &F, ValueRefT LHS,
-                   FPClassTest RHSClass, bool LookThroughSrc) {
-    assert(RHSClass != fcNone);
-    ValueRefT Src = LHS;
-
-    if (Pred == FCmpInst::FCMP_TRUE)
-      return exactClass(Src, fcAllFlags);
-
-    if (Pred == FCmpInst::FCMP_FALSE)
-      return exactClass(Src, fcNone);
-
-    const FPClassTest OrigClass = RHSClass;
-
-    const bool IsNegativeRHS = (RHSClass & fcNegative) == RHSClass;
-    const bool IsPositiveRHS = (RHSClass & fcPositive) == RHSClass;
-    const bool IsNaN = (RHSClass & ~fcNan) == fcNone;
-
-    if (IsNaN) {
-      // fcmp o__ x, nan -> false
-      // fcmp u__ x, nan -> true
-      return exactClass(Src, CmpInst::isOrdered(Pred) ? fcNone : fcAllFlags);
-    }
-
-    // fcmp ord x, zero|normal|subnormal|inf -> ~fcNan
-    if (Pred == FCmpInst::FCMP_ORD)
-      return exactClass(Src, ~fcNan);
-
-    // fcmp uno x, zero|normal|subnormal|inf -> fcNan
-    if (Pred == FCmpInst::FCMP_UNO)
-      return exactClass(Src, fcNan);
-
-    const bool IsFabs = LookThroughSrc && lookThroughFAbs(F, LHS, Src);
-    if (IsFabs)
-      RHSClass = llvm::inverse_fabs(RHSClass);
-
-    const bool IsZero = (OrigClass & fcZero) == OrigClass;
-    if (IsZero) {
-      assert(Pred != FCmpInst::FCMP_ORD && Pred != FCmpInst::FCMP_UNO);
-      // Compares with fcNone are only exactly equal to fcZero if input
-      // denormals are not flushed.
-      // TODO: Handle DAZ by expanding masks to cover subnormal cases.
-      DenormalMode Mode = queryDenormalMode(F, LHS);
-      if (Mode.Input != DenormalMode::IEEE)
-        return {Invalid, fcAllFlags, fcAllFlags};
-
-      switch (Pred) {
-      case FCmpInst::FCMP_OEQ: // Match x == 0.0
-        return exactClass(Src, fcZero);
-      case FCmpInst::FCMP_UEQ: // Match isnan(x) || (x == 0.0)
-        return exactClass(Src, fcZero | fcNan);
-      case FCmpInst::FCMP_UNE: // Match (x != 0.0)
-        return exactClass(Src, ~fcZero);
-      case FCmpInst::FCMP_ONE: // Match !isnan(x) && x != 0.0
-        return exactClass(Src, ~fcNan & ~fcZero);
-      case FCmpInst::FCMP_ORD:
-        // Canonical form of ord/uno is with a zero. We could also handle
-        // non-canonical other non-NaN constants or LHS == RHS.
-        return exactClass(Src, ~fcNan);
-      case FCmpInst::FCMP_UNO:
-        return exactClass(Src, fcNan);
-      case FCmpInst::FCMP_OGT: // x > 0
-        return exactClass(Src, fcPosSubnormal | fcPosNormal | fcPosInf);
-      case FCmpInst::FCMP_UGT: // isnan(x) || x > 0
-        return exactClass(Src, fcPosSubnormal | fcPosNormal | fcPosInf | fcNan);
-      case FCmpInst::FCMP_OGE: // x >= 0
-        return exactClass(Src, fcPositive | fcNegZero);
-      case FCmpInst::FCMP_UGE: // isnan(x) || x >= 0
-        return exactClass(Src, fcPositive | fcNegZero | fcNan);
-      case FCmpInst::FCMP_OLT: // x < 0
-        return exactClass(Src, fcNegSubnormal | fcNegNormal | fcNegInf);
-      case FCmpInst::FCMP_ULT: // isnan(x) || x < 0
-        return exactClass(Src, fcNegSubnormal | fcNegNormal | fcNegInf | fcNan);
-      case FCmpInst::FCMP_OLE: // x <= 0
-        return exactClass(Src, fcNegative | fcPosZero);
-      case FCmpInst::FCMP_ULE: // isnan(x) || x <= 0
-        return exactClass(Src, fcNegative | fcPosZero | fcNan);
-      default:
-        llvm_unreachable("all compare types are handled");
-      }
-
-      return {Invalid, fcAllFlags, fcAllFlags};
-    }
-
-    const bool IsDenormalRHS = (OrigClass & fcSubnormal) == OrigClass;
-
-    const bool IsInf = (OrigClass & fcInf) == OrigClass;
-    if (IsInf) {
-      FPClassTest Mask = fcAllFlags;
-
-      switch (Pred) {
-      case FCmpInst::FCMP_OEQ:
-      case FCmpInst::FCMP_UNE: {
-        // Match __builtin_isinf patterns
-        //
-        //   fcmp oeq x, +inf -> is_fpclass x, fcPosInf
-        //   fcmp oeq fabs(x), +inf -> is_fpclass x, fcInf
-        //   fcmp oeq x, -inf -> is_fpclass x, fcNegInf
-        //   fcmp oeq fabs(x), -inf -> is_fpclass x, 0 -> false
-        //
-        //   fcmp une x, +inf -> is_fpclass x, ~fcPosInf
-        //   fcmp une fabs(x), +inf -> is_fpclass x, ~fcInf
-        //   fcmp une x, -inf -> is_fpclass x, ~fcNegInf
-        //   fcmp une fabs(x), -inf -> is_fpclass x, fcAllFlags -> true
-        if (IsNegativeRHS) {
-          Mask = fcNegInf;
-          if (IsFabs)
-            Mask = fcNone;
-        } else {
-          Mask = fcPosInf;
-          if (IsFabs)
-            Mask |= fcNegInf;
-        }
-        break;
-      }
-      case FCmpInst::FCMP_ONE:
-      case FCmpInst::FCMP_UEQ: {
-        // Match __builtin_isinf patterns
-        //   fcmp one x, -inf -> is_fpclass x, fcNegInf
-        //   fcmp one fabs(x), -inf -> is_fpclass x, ~fcNegInf & ~fcNan
-        //   fcmp one x, +inf -> is_fpclass x, ~fcNegInf & ~fcNan
-        //   fcmp one fabs(x), +inf -> is_fpclass x, ~fcInf & fcNan
-        //
-        //   fcmp ueq x, +inf -> is_fpclass x, fcPosInf|fcNan
-        //   fcmp ueq (fabs x), +inf -> is_fpclass x, fcInf|fcNan
-        //   fcmp ueq x, -inf -> is_fpclass x, fcNegInf|fcNan
-        //   fcmp ueq fabs(x), -inf -> is_fpclass x, fcNan
-        if (IsNegativeRHS) {
-          Mask = ~fcNegInf & ~fcNan;
-          if (IsFabs)
-            Mask = ~fcNan;
-        } else {
-          Mask = ~fcPosInf & ~fcNan;
-          if (IsFabs)
-            Mask &= ~fcNegInf;
-        }
-
-        break;
-      }
-      case FCmpInst::FCMP_OLT:
-      case FCmpInst::FCMP_UGE: {
-        if (IsNegativeRHS) {
-          // No value is ordered and less than negative infinity.
-          // All values are unordered with or at least negative infinity.
-          // fcmp olt x, -inf -> false
-          // fcmp uge x, -inf -> true
-          Mask = fcNone;
-          break;
-        }
-
-        // fcmp olt fabs(x), +inf -> fcFinite
-        // fcmp uge fabs(x), +inf -> ~fcFinite
-        // fcmp olt x, +inf -> fcFinite|fcNegInf
-        // fcmp uge x, +inf -> ~(fcFinite|fcNegInf)
-        Mask = fcFinite;
-        if (!IsFabs)
-          Mask |= fcNegInf;
-        break;
-      }
-      case FCmpInst::FCMP_OGE:
-      case FCmpInst::FCMP_ULT: {
-        if (IsNegativeRHS) {
-          // fcmp oge x, -inf -> ~fcNan
-          // fcmp oge fabs(x), -inf -> ~fcNan
-          // fcmp ult x, -inf -> fcNan
-          // fcmp ult fabs(x), -inf -> fcNan
-          Mask = ~fcNan;
-          break;
-        }
-
-        // fcmp oge fabs(x), +inf -> fcInf
-        // fcmp oge x, +inf -> fcPosInf
-        // fcmp ult fabs(x), +inf -> ~fcInf
-        // fcmp ult x, +inf -> ~fcPosInf
-        Mask = fcPosInf;
-        if (IsFabs)
-          Mask |= fcNegInf;
-        break;
-      }
-      case FCmpInst::FCMP_OGT:
-      case FCmpInst::FCMP_ULE: {
-        if (IsNegativeRHS) {
-          // fcmp ogt x, -inf -> fcmp one x, -inf
-          // fcmp ogt fabs(x), -inf -> fcmp ord x, x
-          // fcmp ule x, -inf -> fcmp ueq x, -inf
-          // fcmp ule fabs(x), -inf -> fcmp uno x, x
-          Mask = IsFabs ? ~fcNan : ~(fcNegInf | fcNan);
-          break;
-        }
-
-        // No value is ordered and greater than infinity.
-        Mask = fcNone;
-        break;
-      }
-      case FCmpInst::FCMP_OLE:
-      case FCmpInst::FCMP_UGT: {
-        if (IsNegativeRHS) {
-          Mask = IsFabs ? fcNone : fcNegInf;
-          break;
-        }
-
-        // fcmp ole x, +inf -> fcmp ord x, x
-        // fcmp ole fabs(x), +inf -> fcmp ord x, x
-        // fcmp ole x, -inf -> fcmp oeq x, -inf
-        // fcmp ole fabs(x), -inf -> false
-        Mask = ~fcNan;
-        break;
-      }
-      default:
-        llvm_unreachable("all compare types are handled");
-      }
-
-      // Invert the comparison for the unordered cases.
-      if (FCmpInst::isUnordered(Pred))
-        Mask = ~Mask;
-
-      return exactClass(Src, Mask);
-    }
-
-    if (Pred == FCmpInst::FCMP_OEQ)
-      return {Src, RHSClass, fcAllFlags};
-
-    if (Pred == FCmpInst::FCMP_UEQ) {
-      FPClassTest Class = RHSClass | fcNan;
-      return {Src, Class, ~fcNan};
-    }
-
-    if (Pred == FCmpInst::FCMP_ONE)
-      return {Src, ~fcNan, RHSClass | fcNan};
-
-    if (Pred == FCmpInst::FCMP_UNE)
-      return {Src, fcAllFlags, RHSClass};
-
-    assert((RHSClass == fcNone || RHSClass == fcPosNormal ||
-            RHSClass == fcNegNormal || RHSClass == fcNormal ||
-            RHSClass == fcPosSubnormal || RHSClass == fcNegSubnormal ||
-            RHSClass == fcSubnormal) &&
-           "should have been recognized as an exact class test");
-
-    if (IsNegativeRHS) {
-      // TODO: Handle fneg(fabs)
-      if (IsFabs) {
-        // fabs(x) o> -k -> fcmp ord x, x
-        // fabs(x) u> -k -> true
-        // fabs(x) o< -k -> false
-        // fabs(x) u< -k -> fcmp uno x, x
-        switch (Pred) {
-        case FCmpInst::FCMP_OGT:
-        case FCmpInst::FCMP_OGE:
-          return {Src, ~fcNan, fcNan};
-        case FCmpInst::FCMP_UGT:
-        case FCmpInst::FCMP_UGE:
-          return {Src, fcAllFlags, fcNone};
-        case FCmpInst::FCMP_OLT:
-        case FCmpInst::FCMP_OLE:
-          return {Src, fcNone, fcAllFlags};
-        case FCmpInst::FCMP_ULT:
-        case FCmpInst::FCMP_ULE:
-          return {Src, fcNan, ~fcNan};
-        default:
-          break;
-        }
-
-        return {Invalid, fcAllFlags, fcAllFlags};
-      }
-
-      FPClassTest ClassesLE = fcNegInf | fcNegNormal;
-      FPClassTest ClassesGE = fcPositive | fcNegZero | fcNegSubnormal;
-
-      if (IsDenormalRHS)
-        ClassesLE |= fcNegSubnormal;
-      else
-        ClassesGE |= fcNegNormal;
-
-      switch (Pred) {
-      case FCmpInst::FCMP_OGT:
-      case FCmpInst::FCMP_OGE:
-        return {Src, ClassesGE, ~ClassesGE | RHSClass};
-      case FCmpInst::FCMP_UGT:
-      case FCmpInst::FCMP_UGE:
-        return {Src, ClassesGE | fcNan, ~(ClassesGE | fcNan) | RHSClass};
-      case FCmpInst::FCMP_OLT:
-      case FCmpInst::FCMP_OLE:
-        return {Src, ClassesLE, ~ClassesLE | RHSClass};
-      case FCmpInst::FCMP_ULT:
-      case FCmpInst::FCMP_ULE:
-        return {Src, ClassesLE | fcNan, ~(ClassesLE | fcNan) | RHSClass};
-      default:
-        break;
-      }
-    } else if (IsPositiveRHS) {
-      FPClassTest ClassesGE = fcPosNormal | fcPosInf;
-      FPClassTest ClassesLE = fcNegative | fcPosZero | fcPosSubnormal;
-      if (IsDenormalRHS)
-        ClassesGE |= fcPosSubnormal;
-      else
-        ClassesLE |= fcPosNormal;
-
-      if (IsFabs) {
-        ClassesGE = llvm::inverse_fabs(ClassesGE);
-        ClassesLE = llvm::inverse_fabs(ClassesLE);
-      }
-
-      switch (Pred) {
-      case FCmpInst::FCMP_OGT:
-      case FCmpInst::FCMP_OGE:
-        return {Src, ClassesGE, ~ClassesGE | RHSClass};
-      case FCmpInst::FCMP_UGT:
-      case FCmpInst::FCMP_UGE:
-        return {Src, ClassesGE | fcNan, ~(ClassesGE | fcNan) | RHSClass};
-      case FCmpInst::FCMP_OLT:
-      case FCmpInst::FCMP_OLE:
-        return {Src, ClassesLE, ~ClassesLE | RHSClass};
-      case FCmpInst::FCMP_ULT:
-      case FCmpInst::FCMP_ULE:
-        return {Src, ClassesLE | fcNan, ~(ClassesLE | fcNan) | RHSClass};
-      default:
-        break;
-      }
-    }
-
-    return {Invalid, fcAllFlags, fcAllFlags};
-  }
-
-  static std::tuple<ValueRefT, FPClassTest, FPClassTest>
-  fcmpImpliesClass(CmpInst::Predicate Pred, const FunctionT &F, ValueRefT LHS,
-                   const APFloat &ConstRHS, bool LookThroughSrc) {
-    // We can refine checks against smallest normal / largest denormal to an
-    // exact class test.
-    if (!ConstRHS.isNegative() && ConstRHS.isSmallestNormalized()) {
-      ValueRefT Src = LHS;
-      const bool IsFabs = LookThroughSrc && lookThroughFAbs(F, LHS, Src);
-
-      FPClassTest Mask;
-      // Match pattern that's used in __builtin_isnormal.
-      switch (Pred) {
-      case FCmpInst::FCMP_OLT:
-      case FCmpInst::FCMP_UGE: {
-        // fcmp olt x, smallest_normal ->
-        // fcNegInf|fcNegNormal|fcSubnormal|fcZero fcmp olt fabs(x),
-        // smallest_normal -> fcSubnormal|fcZero fcmp uge x, smallest_normal ->
-        // fcNan|fcPosNormal|fcPosInf fcmp uge fabs(x), smallest_normal ->
-        // ~(fcSubnormal|fcZero)
-        Mask = fcZero | fcSubnormal;
-        if (!IsFabs)
-          Mask |= fcNegNormal | fcNegInf;
-
-        break;
-      }
-      case FCmpInst::FCMP_OGE:
-      case FCmpInst::FCMP_ULT: {
-        // fcmp oge x, smallest_normal -> fcPosNormal | fcPosInf
-        // fcmp oge fabs(x), smallest_normal -> fcInf | fcNormal
-        // fcmp ult x, smallest_normal -> ~(fcPosNormal | fcPosInf)
-        // fcmp ult fabs(x), smallest_normal -> ~(fcInf | fcNormal)
-        Mask = fcPosInf | fcPosNormal;
-        if (IsFabs)
-          Mask |= fcNegInf | fcNegNormal;
-        break;
-      }
-      default:
-        return fcmpImpliesClass(Pred, F, LHS, ConstRHS.classify(),
-                                LookThroughSrc);
-      }
-
-      // Invert the comparison for the unordered cases.
-      if (FCmpInst::isUnordered(Pred))
-        Mask = ~Mask;
-
-      return exactClass(Src, Mask);
-    }
-
-    return fcmpImpliesClass(Pred, F, LHS, ConstRHS.classify(), LookThroughSrc);
-  }
-
-  static std::tuple<ValueRefT, FPClassTest, FPClassTest>
-  fcmpImpliesClass(CmpInst::Predicate Pred, const FunctionT &F, ValueRefT LHS,
-                   ValueRefT RHS, bool LookThroughSrc) {
-    std::optional<APFloat> ConstRHS = matchConstantFloat(F, RHS);
-    if (!ConstRHS)
-      return {Invalid, fcAllFlags, fcAllFlags};
-
-    // TODO: Just call computeKnownFPClass for RHS to handle non-constants.
-    return fcmpImpliesClass(Pred, F, LHS, *ConstRHS, LookThroughSrc);
-  }
-};
-
-} // namespace llvm
-
-#endif // LLVM_ADT_GENERICFLOATINGPOINTPREDICATEUTILS_H
diff --git a/llvm/include/llvm/Analysis/FloatingPointPredicateUtils.h b/llvm/include/llvm/Analysis/FloatingPointPredicateUtils.h
deleted file mode 100644
index 96fdbf48d8b43..0000000000000
--- a/llvm/include/llvm/Analysis/FloatingPointPredicateUtils.h
+++ /dev/null
@@ -1,73 +0,0 @@
-//===- llvm/Analysis/FloatingPointPredicateUtils.h ------------*- C++ -*---===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_ANALYSIS_FLOATINGPOINTPREDICATEUTILS_H
-#define LLVM_ANALYSIS_FLOATINGPOINTPREDICATEUTILS_H
-
-#include "llvm/ADT/GenericFloatingPointPredicateUtils.h"
-#include "llvm/IR/SSAContext.h"
-
-namespace llvm {
-
-using FloatingPointPredicateUtils =
-    GenericFloatingPointPredicateUtils<SSAContext>;
-
-/// Returns a pair of values, which if passed to llvm.is.fpclass, returns the
-/// same result as an fcmp with the given operands.
-///
-/// If \p LookThroughSrc is true, consider the input value when computing the
-/// mask.
-///
-/// If \p LookThroughSrc is false, ignore the source value (i.e. the first pair
-/// element will always be LHS.
-inline std::pair<Value *, FPClassTest>
-fcmpToClassTest(FCmpInst::Predicate Pred, const Function &F, Value *LHS,
-                Value *RHS, bool LookThroughSrc = true) {
-  return FloatingPointPredicateUtils::fcmpToClassTest(Pred, F, LHS, RHS,
-                                                      LookThroughSrc = true);
-}
-
-/// Returns a pair of values, which if passed to llvm.is.fpclass, returns the
-/// same result as an fcmp with the given operands.
-///
-/// If \p LookThroughSrc is true, consider the input value when computing the
-/// mask.
-///
-/// If \p LookThroughSrc is false, ignore the source value (i.e. the first pair
-/// element will always be LHS.
-inline std::pair<Value *, FPClassTest>
-fcmpToClassTest(FCmpInst::Predicate Pred, const Function &F, Value *LHS,
-                const APFloat *ConstRHS, bool LookThroughSrc = true) {
-  return FloatingPointPredicateUtils::fcmpToClassTest(Pred, F, LHS, *ConstRHS,
-                                                      LookThroughSrc);
-}
-
-inline std::tuple<Value *, FPClassTest, FPClassTest>
-fcmpImpliesClass(CmpInst::Predicate Pred, const Function &F, Value *LHS,
-                 FPClassTest RHSClass, bool LookThroughSrc = true) {
-  return FloatingPointPredicateUtils::fcmpImpliesClass(Pred, F, LHS, RHSClass,
-                                                       LookThroughSrc);
-}
-
-inline std::tuple<Value *, FPClassTest, FPClassTest>
-fcmpImpliesClass(CmpInst::Predicate Pred, const Function &F, Value *LHS,
-                 const APFloat &ConstRHS, bool LookThroughSrc = true) {
-  return FloatingPointPredicateUtils::fcmpImpliesClass(Pred, F, LHS, Const...
[truncated]

@llvmbot
Copy link
Member

llvmbot commented May 21, 2025

@llvm/pr-subscribers-llvm-transforms

Author: None (Kewen12)

Changes

This reverts commit d00d74b.

The PR breaks our buildbots and blocks downstream merge.


Patch is 47.40 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/140968.diff

13 Files Affected:

  • (removed) llvm/include/llvm/ADT/GenericFloatingPointPredicateUtils.h (-479)
  • (removed) llvm/include/llvm/Analysis/FloatingPointPredicateUtils.h (-73)
  • (modified) llvm/include/llvm/Analysis/ValueTracking.h (+43)
  • (removed) llvm/include/llvm/CodeGen/MachineFloatingPointPredicateUtils.h (-46)
  • (modified) llvm/lib/Analysis/CMakeLists.txt (-1)
  • (removed) llvm/lib/Analysis/FloatingPointPredicateUtils.cpp (-41)
  • (modified) llvm/lib/Analysis/InstructionSimplify.cpp (-1)
  • (modified) llvm/lib/Analysis/ValueTracking.cpp (+422-2)
  • (modified) llvm/lib/CodeGen/CMakeLists.txt (-1)
  • (modified) llvm/lib/CodeGen/CodeGenPrepare.cpp (-1)
  • (removed) llvm/lib/CodeGen/MachineFloatingPointPredicateUtils.cpp (-48)
  • (modified) llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp (-1)
  • (modified) llvm/unittests/Analysis/ValueTrackingTest.cpp (-1)
diff --git a/llvm/include/llvm/ADT/GenericFloatingPointPredicateUtils.h b/llvm/include/llvm/ADT/GenericFloatingPointPredicateUtils.h
deleted file mode 100644
index 49c5fe0aed6e1..0000000000000
--- a/llvm/include/llvm/ADT/GenericFloatingPointPredicateUtils.h
+++ /dev/null
@@ -1,479 +0,0 @@
-//===- llvm/Support/GenericFloatingPointPredicateUtils.h -----*- C++-*-----===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-///
-/// \file
-/// Utilities for dealing with flags related to floating point properties and
-/// mode controls.
-///
-//===----------------------------------------------------------------------===/
-
-#ifndef LLVM_ADT_GENERICFLOATINGPOINTPREDICATEUTILS_H
-#define LLVM_ADT_GENERICFLOATINGPOINTPREDICATEUTILS_H
-
-#include "llvm/ADT/APFloat.h"
-#include "llvm/ADT/FloatingPointMode.h"
-#include "llvm/IR/Instructions.h"
-#include <optional>
-
-namespace llvm {
-
-template <typename ContextT> class GenericFloatingPointPredicateUtils {
-  using ValueRefT = typename ContextT::ValueRefT;
-  using FunctionT = typename ContextT::FunctionT;
-
-  constexpr static ValueRefT Invalid = {};
-
-private:
-  static DenormalMode queryDenormalMode(const FunctionT &F, ValueRefT Val);
-
-  static bool lookThroughFAbs(const FunctionT &F, ValueRefT LHS,
-                              ValueRefT &Src);
-
-  static std::optional<APFloat> matchConstantFloat(const FunctionT &F,
-                                                   ValueRefT Val);
-
-  /// Return the return value for fcmpImpliesClass for a compare that produces
-  /// an exact class test.
-  static std::tuple<ValueRefT, FPClassTest, FPClassTest>
-  exactClass(ValueRefT V, FPClassTest M) {
-    return {V, M, ~M};
-  }
-
-public:
-  /// Returns a pair of values, which if passed to llvm.is.fpclass, returns the
-  /// same result as an fcmp with the given operands.
-  static std::pair<ValueRefT, FPClassTest>
-  fcmpToClassTest(FCmpInst::Predicate Pred, const FunctionT &F, ValueRefT LHS,
-                  ValueRefT RHS, bool LookThroughSrc) {
-    std::optional<APFloat> ConstRHS = matchConstantFloat(F, RHS);
-    if (!ConstRHS)
-      return {Invalid, fcAllFlags};
-
-    return fcmpToClassTest(Pred, F, LHS, *ConstRHS, LookThroughSrc);
-  }
-
-  static std::pair<ValueRefT, FPClassTest>
-  fcmpToClassTest(FCmpInst::Predicate Pred, const FunctionT &F, ValueRefT LHS,
-                  const APFloat &ConstRHS, bool LookThroughSrc) {
-
-    auto [Src, ClassIfTrue, ClassIfFalse] =
-        fcmpImpliesClass(Pred, F, LHS, ConstRHS, LookThroughSrc);
-
-    if (Src && ClassIfTrue == ~ClassIfFalse)
-      return {Src, ClassIfTrue};
-
-    return {Invalid, fcAllFlags};
-  }
-
-  /// Compute the possible floating-point classes that \p LHS could be based on
-  /// fcmp \Pred \p LHS, \p RHS.
-  ///
-  /// \returns { TestedValue, ClassesIfTrue, ClassesIfFalse }
-  ///
-  /// If the compare returns an exact class test, ClassesIfTrue ==
-  /// ~ClassesIfFalse
-  ///
-  /// This is a less exact version of fcmpToClassTest (e.g. fcmpToClassTest will
-  /// only succeed for a test of x > 0 implies positive, but not x > 1).
-  ///
-  /// If \p LookThroughSrc is true, consider the input value when computing the
-  /// mask. This may look through sign bit operations.
-  ///
-  /// If \p LookThroughSrc is false, ignore the source value (i.e. the first
-  /// pair element will always be LHS.
-  ///
-  static std::tuple<ValueRefT, FPClassTest, FPClassTest>
-  fcmpImpliesClass(CmpInst::Predicate Pred, const FunctionT &F, ValueRefT LHS,
-                   FPClassTest RHSClass, bool LookThroughSrc) {
-    assert(RHSClass != fcNone);
-    ValueRefT Src = LHS;
-
-    if (Pred == FCmpInst::FCMP_TRUE)
-      return exactClass(Src, fcAllFlags);
-
-    if (Pred == FCmpInst::FCMP_FALSE)
-      return exactClass(Src, fcNone);
-
-    const FPClassTest OrigClass = RHSClass;
-
-    const bool IsNegativeRHS = (RHSClass & fcNegative) == RHSClass;
-    const bool IsPositiveRHS = (RHSClass & fcPositive) == RHSClass;
-    const bool IsNaN = (RHSClass & ~fcNan) == fcNone;
-
-    if (IsNaN) {
-      // fcmp o__ x, nan -> false
-      // fcmp u__ x, nan -> true
-      return exactClass(Src, CmpInst::isOrdered(Pred) ? fcNone : fcAllFlags);
-    }
-
-    // fcmp ord x, zero|normal|subnormal|inf -> ~fcNan
-    if (Pred == FCmpInst::FCMP_ORD)
-      return exactClass(Src, ~fcNan);
-
-    // fcmp uno x, zero|normal|subnormal|inf -> fcNan
-    if (Pred == FCmpInst::FCMP_UNO)
-      return exactClass(Src, fcNan);
-
-    const bool IsFabs = LookThroughSrc && lookThroughFAbs(F, LHS, Src);
-    if (IsFabs)
-      RHSClass = llvm::inverse_fabs(RHSClass);
-
-    const bool IsZero = (OrigClass & fcZero) == OrigClass;
-    if (IsZero) {
-      assert(Pred != FCmpInst::FCMP_ORD && Pred != FCmpInst::FCMP_UNO);
-      // Compares with fcNone are only exactly equal to fcZero if input
-      // denormals are not flushed.
-      // TODO: Handle DAZ by expanding masks to cover subnormal cases.
-      DenormalMode Mode = queryDenormalMode(F, LHS);
-      if (Mode.Input != DenormalMode::IEEE)
-        return {Invalid, fcAllFlags, fcAllFlags};
-
-      switch (Pred) {
-      case FCmpInst::FCMP_OEQ: // Match x == 0.0
-        return exactClass(Src, fcZero);
-      case FCmpInst::FCMP_UEQ: // Match isnan(x) || (x == 0.0)
-        return exactClass(Src, fcZero | fcNan);
-      case FCmpInst::FCMP_UNE: // Match (x != 0.0)
-        return exactClass(Src, ~fcZero);
-      case FCmpInst::FCMP_ONE: // Match !isnan(x) && x != 0.0
-        return exactClass(Src, ~fcNan & ~fcZero);
-      case FCmpInst::FCMP_ORD:
-        // Canonical form of ord/uno is with a zero. We could also handle
-        // non-canonical other non-NaN constants or LHS == RHS.
-        return exactClass(Src, ~fcNan);
-      case FCmpInst::FCMP_UNO:
-        return exactClass(Src, fcNan);
-      case FCmpInst::FCMP_OGT: // x > 0
-        return exactClass(Src, fcPosSubnormal | fcPosNormal | fcPosInf);
-      case FCmpInst::FCMP_UGT: // isnan(x) || x > 0
-        return exactClass(Src, fcPosSubnormal | fcPosNormal | fcPosInf | fcNan);
-      case FCmpInst::FCMP_OGE: // x >= 0
-        return exactClass(Src, fcPositive | fcNegZero);
-      case FCmpInst::FCMP_UGE: // isnan(x) || x >= 0
-        return exactClass(Src, fcPositive | fcNegZero | fcNan);
-      case FCmpInst::FCMP_OLT: // x < 0
-        return exactClass(Src, fcNegSubnormal | fcNegNormal | fcNegInf);
-      case FCmpInst::FCMP_ULT: // isnan(x) || x < 0
-        return exactClass(Src, fcNegSubnormal | fcNegNormal | fcNegInf | fcNan);
-      case FCmpInst::FCMP_OLE: // x <= 0
-        return exactClass(Src, fcNegative | fcPosZero);
-      case FCmpInst::FCMP_ULE: // isnan(x) || x <= 0
-        return exactClass(Src, fcNegative | fcPosZero | fcNan);
-      default:
-        llvm_unreachable("all compare types are handled");
-      }
-
-      return {Invalid, fcAllFlags, fcAllFlags};
-    }
-
-    const bool IsDenormalRHS = (OrigClass & fcSubnormal) == OrigClass;
-
-    const bool IsInf = (OrigClass & fcInf) == OrigClass;
-    if (IsInf) {
-      FPClassTest Mask = fcAllFlags;
-
-      switch (Pred) {
-      case FCmpInst::FCMP_OEQ:
-      case FCmpInst::FCMP_UNE: {
-        // Match __builtin_isinf patterns
-        //
-        //   fcmp oeq x, +inf -> is_fpclass x, fcPosInf
-        //   fcmp oeq fabs(x), +inf -> is_fpclass x, fcInf
-        //   fcmp oeq x, -inf -> is_fpclass x, fcNegInf
-        //   fcmp oeq fabs(x), -inf -> is_fpclass x, 0 -> false
-        //
-        //   fcmp une x, +inf -> is_fpclass x, ~fcPosInf
-        //   fcmp une fabs(x), +inf -> is_fpclass x, ~fcInf
-        //   fcmp une x, -inf -> is_fpclass x, ~fcNegInf
-        //   fcmp une fabs(x), -inf -> is_fpclass x, fcAllFlags -> true
-        if (IsNegativeRHS) {
-          Mask = fcNegInf;
-          if (IsFabs)
-            Mask = fcNone;
-        } else {
-          Mask = fcPosInf;
-          if (IsFabs)
-            Mask |= fcNegInf;
-        }
-        break;
-      }
-      case FCmpInst::FCMP_ONE:
-      case FCmpInst::FCMP_UEQ: {
-        // Match __builtin_isinf patterns
-        //   fcmp one x, -inf -> is_fpclass x, fcNegInf
-        //   fcmp one fabs(x), -inf -> is_fpclass x, ~fcNegInf & ~fcNan
-        //   fcmp one x, +inf -> is_fpclass x, ~fcNegInf & ~fcNan
-        //   fcmp one fabs(x), +inf -> is_fpclass x, ~fcInf & fcNan
-        //
-        //   fcmp ueq x, +inf -> is_fpclass x, fcPosInf|fcNan
-        //   fcmp ueq (fabs x), +inf -> is_fpclass x, fcInf|fcNan
-        //   fcmp ueq x, -inf -> is_fpclass x, fcNegInf|fcNan
-        //   fcmp ueq fabs(x), -inf -> is_fpclass x, fcNan
-        if (IsNegativeRHS) {
-          Mask = ~fcNegInf & ~fcNan;
-          if (IsFabs)
-            Mask = ~fcNan;
-        } else {
-          Mask = ~fcPosInf & ~fcNan;
-          if (IsFabs)
-            Mask &= ~fcNegInf;
-        }
-
-        break;
-      }
-      case FCmpInst::FCMP_OLT:
-      case FCmpInst::FCMP_UGE: {
-        if (IsNegativeRHS) {
-          // No value is ordered and less than negative infinity.
-          // All values are unordered with or at least negative infinity.
-          // fcmp olt x, -inf -> false
-          // fcmp uge x, -inf -> true
-          Mask = fcNone;
-          break;
-        }
-
-        // fcmp olt fabs(x), +inf -> fcFinite
-        // fcmp uge fabs(x), +inf -> ~fcFinite
-        // fcmp olt x, +inf -> fcFinite|fcNegInf
-        // fcmp uge x, +inf -> ~(fcFinite|fcNegInf)
-        Mask = fcFinite;
-        if (!IsFabs)
-          Mask |= fcNegInf;
-        break;
-      }
-      case FCmpInst::FCMP_OGE:
-      case FCmpInst::FCMP_ULT: {
-        if (IsNegativeRHS) {
-          // fcmp oge x, -inf -> ~fcNan
-          // fcmp oge fabs(x), -inf -> ~fcNan
-          // fcmp ult x, -inf -> fcNan
-          // fcmp ult fabs(x), -inf -> fcNan
-          Mask = ~fcNan;
-          break;
-        }
-
-        // fcmp oge fabs(x), +inf -> fcInf
-        // fcmp oge x, +inf -> fcPosInf
-        // fcmp ult fabs(x), +inf -> ~fcInf
-        // fcmp ult x, +inf -> ~fcPosInf
-        Mask = fcPosInf;
-        if (IsFabs)
-          Mask |= fcNegInf;
-        break;
-      }
-      case FCmpInst::FCMP_OGT:
-      case FCmpInst::FCMP_ULE: {
-        if (IsNegativeRHS) {
-          // fcmp ogt x, -inf -> fcmp one x, -inf
-          // fcmp ogt fabs(x), -inf -> fcmp ord x, x
-          // fcmp ule x, -inf -> fcmp ueq x, -inf
-          // fcmp ule fabs(x), -inf -> fcmp uno x, x
-          Mask = IsFabs ? ~fcNan : ~(fcNegInf | fcNan);
-          break;
-        }
-
-        // No value is ordered and greater than infinity.
-        Mask = fcNone;
-        break;
-      }
-      case FCmpInst::FCMP_OLE:
-      case FCmpInst::FCMP_UGT: {
-        if (IsNegativeRHS) {
-          Mask = IsFabs ? fcNone : fcNegInf;
-          break;
-        }
-
-        // fcmp ole x, +inf -> fcmp ord x, x
-        // fcmp ole fabs(x), +inf -> fcmp ord x, x
-        // fcmp ole x, -inf -> fcmp oeq x, -inf
-        // fcmp ole fabs(x), -inf -> false
-        Mask = ~fcNan;
-        break;
-      }
-      default:
-        llvm_unreachable("all compare types are handled");
-      }
-
-      // Invert the comparison for the unordered cases.
-      if (FCmpInst::isUnordered(Pred))
-        Mask = ~Mask;
-
-      return exactClass(Src, Mask);
-    }
-
-    if (Pred == FCmpInst::FCMP_OEQ)
-      return {Src, RHSClass, fcAllFlags};
-
-    if (Pred == FCmpInst::FCMP_UEQ) {
-      FPClassTest Class = RHSClass | fcNan;
-      return {Src, Class, ~fcNan};
-    }
-
-    if (Pred == FCmpInst::FCMP_ONE)
-      return {Src, ~fcNan, RHSClass | fcNan};
-
-    if (Pred == FCmpInst::FCMP_UNE)
-      return {Src, fcAllFlags, RHSClass};
-
-    assert((RHSClass == fcNone || RHSClass == fcPosNormal ||
-            RHSClass == fcNegNormal || RHSClass == fcNormal ||
-            RHSClass == fcPosSubnormal || RHSClass == fcNegSubnormal ||
-            RHSClass == fcSubnormal) &&
-           "should have been recognized as an exact class test");
-
-    if (IsNegativeRHS) {
-      // TODO: Handle fneg(fabs)
-      if (IsFabs) {
-        // fabs(x) o> -k -> fcmp ord x, x
-        // fabs(x) u> -k -> true
-        // fabs(x) o< -k -> false
-        // fabs(x) u< -k -> fcmp uno x, x
-        switch (Pred) {
-        case FCmpInst::FCMP_OGT:
-        case FCmpInst::FCMP_OGE:
-          return {Src, ~fcNan, fcNan};
-        case FCmpInst::FCMP_UGT:
-        case FCmpInst::FCMP_UGE:
-          return {Src, fcAllFlags, fcNone};
-        case FCmpInst::FCMP_OLT:
-        case FCmpInst::FCMP_OLE:
-          return {Src, fcNone, fcAllFlags};
-        case FCmpInst::FCMP_ULT:
-        case FCmpInst::FCMP_ULE:
-          return {Src, fcNan, ~fcNan};
-        default:
-          break;
-        }
-
-        return {Invalid, fcAllFlags, fcAllFlags};
-      }
-
-      FPClassTest ClassesLE = fcNegInf | fcNegNormal;
-      FPClassTest ClassesGE = fcPositive | fcNegZero | fcNegSubnormal;
-
-      if (IsDenormalRHS)
-        ClassesLE |= fcNegSubnormal;
-      else
-        ClassesGE |= fcNegNormal;
-
-      switch (Pred) {
-      case FCmpInst::FCMP_OGT:
-      case FCmpInst::FCMP_OGE:
-        return {Src, ClassesGE, ~ClassesGE | RHSClass};
-      case FCmpInst::FCMP_UGT:
-      case FCmpInst::FCMP_UGE:
-        return {Src, ClassesGE | fcNan, ~(ClassesGE | fcNan) | RHSClass};
-      case FCmpInst::FCMP_OLT:
-      case FCmpInst::FCMP_OLE:
-        return {Src, ClassesLE, ~ClassesLE | RHSClass};
-      case FCmpInst::FCMP_ULT:
-      case FCmpInst::FCMP_ULE:
-        return {Src, ClassesLE | fcNan, ~(ClassesLE | fcNan) | RHSClass};
-      default:
-        break;
-      }
-    } else if (IsPositiveRHS) {
-      FPClassTest ClassesGE = fcPosNormal | fcPosInf;
-      FPClassTest ClassesLE = fcNegative | fcPosZero | fcPosSubnormal;
-      if (IsDenormalRHS)
-        ClassesGE |= fcPosSubnormal;
-      else
-        ClassesLE |= fcPosNormal;
-
-      if (IsFabs) {
-        ClassesGE = llvm::inverse_fabs(ClassesGE);
-        ClassesLE = llvm::inverse_fabs(ClassesLE);
-      }
-
-      switch (Pred) {
-      case FCmpInst::FCMP_OGT:
-      case FCmpInst::FCMP_OGE:
-        return {Src, ClassesGE, ~ClassesGE | RHSClass};
-      case FCmpInst::FCMP_UGT:
-      case FCmpInst::FCMP_UGE:
-        return {Src, ClassesGE | fcNan, ~(ClassesGE | fcNan) | RHSClass};
-      case FCmpInst::FCMP_OLT:
-      case FCmpInst::FCMP_OLE:
-        return {Src, ClassesLE, ~ClassesLE | RHSClass};
-      case FCmpInst::FCMP_ULT:
-      case FCmpInst::FCMP_ULE:
-        return {Src, ClassesLE | fcNan, ~(ClassesLE | fcNan) | RHSClass};
-      default:
-        break;
-      }
-    }
-
-    return {Invalid, fcAllFlags, fcAllFlags};
-  }
-
-  static std::tuple<ValueRefT, FPClassTest, FPClassTest>
-  fcmpImpliesClass(CmpInst::Predicate Pred, const FunctionT &F, ValueRefT LHS,
-                   const APFloat &ConstRHS, bool LookThroughSrc) {
-    // We can refine checks against smallest normal / largest denormal to an
-    // exact class test.
-    if (!ConstRHS.isNegative() && ConstRHS.isSmallestNormalized()) {
-      ValueRefT Src = LHS;
-      const bool IsFabs = LookThroughSrc && lookThroughFAbs(F, LHS, Src);
-
-      FPClassTest Mask;
-      // Match pattern that's used in __builtin_isnormal.
-      switch (Pred) {
-      case FCmpInst::FCMP_OLT:
-      case FCmpInst::FCMP_UGE: {
-        // fcmp olt x, smallest_normal ->
-        // fcNegInf|fcNegNormal|fcSubnormal|fcZero fcmp olt fabs(x),
-        // smallest_normal -> fcSubnormal|fcZero fcmp uge x, smallest_normal ->
-        // fcNan|fcPosNormal|fcPosInf fcmp uge fabs(x), smallest_normal ->
-        // ~(fcSubnormal|fcZero)
-        Mask = fcZero | fcSubnormal;
-        if (!IsFabs)
-          Mask |= fcNegNormal | fcNegInf;
-
-        break;
-      }
-      case FCmpInst::FCMP_OGE:
-      case FCmpInst::FCMP_ULT: {
-        // fcmp oge x, smallest_normal -> fcPosNormal | fcPosInf
-        // fcmp oge fabs(x), smallest_normal -> fcInf | fcNormal
-        // fcmp ult x, smallest_normal -> ~(fcPosNormal | fcPosInf)
-        // fcmp ult fabs(x), smallest_normal -> ~(fcInf | fcNormal)
-        Mask = fcPosInf | fcPosNormal;
-        if (IsFabs)
-          Mask |= fcNegInf | fcNegNormal;
-        break;
-      }
-      default:
-        return fcmpImpliesClass(Pred, F, LHS, ConstRHS.classify(),
-                                LookThroughSrc);
-      }
-
-      // Invert the comparison for the unordered cases.
-      if (FCmpInst::isUnordered(Pred))
-        Mask = ~Mask;
-
-      return exactClass(Src, Mask);
-    }
-
-    return fcmpImpliesClass(Pred, F, LHS, ConstRHS.classify(), LookThroughSrc);
-  }
-
-  static std::tuple<ValueRefT, FPClassTest, FPClassTest>
-  fcmpImpliesClass(CmpInst::Predicate Pred, const FunctionT &F, ValueRefT LHS,
-                   ValueRefT RHS, bool LookThroughSrc) {
-    std::optional<APFloat> ConstRHS = matchConstantFloat(F, RHS);
-    if (!ConstRHS)
-      return {Invalid, fcAllFlags, fcAllFlags};
-
-    // TODO: Just call computeKnownFPClass for RHS to handle non-constants.
-    return fcmpImpliesClass(Pred, F, LHS, *ConstRHS, LookThroughSrc);
-  }
-};
-
-} // namespace llvm
-
-#endif // LLVM_ADT_GENERICFLOATINGPOINTPREDICATEUTILS_H
diff --git a/llvm/include/llvm/Analysis/FloatingPointPredicateUtils.h b/llvm/include/llvm/Analysis/FloatingPointPredicateUtils.h
deleted file mode 100644
index 96fdbf48d8b43..0000000000000
--- a/llvm/include/llvm/Analysis/FloatingPointPredicateUtils.h
+++ /dev/null
@@ -1,73 +0,0 @@
-//===- llvm/Analysis/FloatingPointPredicateUtils.h ------------*- C++ -*---===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_ANALYSIS_FLOATINGPOINTPREDICATEUTILS_H
-#define LLVM_ANALYSIS_FLOATINGPOINTPREDICATEUTILS_H
-
-#include "llvm/ADT/GenericFloatingPointPredicateUtils.h"
-#include "llvm/IR/SSAContext.h"
-
-namespace llvm {
-
-using FloatingPointPredicateUtils =
-    GenericFloatingPointPredicateUtils<SSAContext>;
-
-/// Returns a pair of values, which if passed to llvm.is.fpclass, returns the
-/// same result as an fcmp with the given operands.
-///
-/// If \p LookThroughSrc is true, consider the input value when computing the
-/// mask.
-///
-/// If \p LookThroughSrc is false, ignore the source value (i.e. the first pair
-/// element will always be LHS.
-inline std::pair<Value *, FPClassTest>
-fcmpToClassTest(FCmpInst::Predicate Pred, const Function &F, Value *LHS,
-                Value *RHS, bool LookThroughSrc = true) {
-  return FloatingPointPredicateUtils::fcmpToClassTest(Pred, F, LHS, RHS,
-                                                      LookThroughSrc = true);
-}
-
-/// Returns a pair of values, which if passed to llvm.is.fpclass, returns the
-/// same result as an fcmp with the given operands.
-///
-/// If \p LookThroughSrc is true, consider the input value when computing the
-/// mask.
-///
-/// If \p LookThroughSrc is false, ignore the source value (i.e. the first pair
-/// element will always be LHS.
-inline std::pair<Value *, FPClassTest>
-fcmpToClassTest(FCmpInst::Predicate Pred, const Function &F, Value *LHS,
-                const APFloat *ConstRHS, bool LookThroughSrc = true) {
-  return FloatingPointPredicateUtils::fcmpToClassTest(Pred, F, LHS, *ConstRHS,
-                                                      LookThroughSrc);
-}
-
-inline std::tuple<Value *, FPClassTest, FPClassTest>
-fcmpImpliesClass(CmpInst::Predicate Pred, const Function &F, Value *LHS,
-                 FPClassTest RHSClass, bool LookThroughSrc = true) {
-  return FloatingPointPredicateUtils::fcmpImpliesClass(Pred, F, LHS, RHSClass,
-                                                       LookThroughSrc);
-}
-
-inline std::tuple<Value *, FPClassTest, FPClassTest>
-fcmpImpliesClass(CmpInst::Predicate Pred, const Function &F, Value *LHS,
-                 const APFloat &ConstRHS, bool LookThroughSrc = true) {
-  return FloatingPointPredicateUtils::fcmpImpliesClass(Pred, F, LHS, Const...
[truncated]

@ronlieb ronlieb self-requested a review May 21, 2025 23:30
@ronlieb ronlieb merged commit c47a5fb into llvm:main May 21, 2025
4 of 6 checks passed
Copy link

@Kewen12 Congratulations on having your first Pull Request (PR) merged into the LLVM Project!

Your changes will be combined with recent changes from other authors, then tested by our build bots. If there is a problem with a build, you may receive a report in an email or a comment on this PR.

Please check whether problems have been caused by your change specifically, as the builds can include changes from many authors. It is not uncommon for your change to be included in a build that fails due to someone else's changes, or infrastructure issues.

How to do this, and the rest of the post-merge process, is covered in detail here.

If your change does cause a problem, it may be reverted, or you can revert it yourself. This is a normal part of LLVM development. You can fix your changes and open a new PR to merge them again.

If you don't get any reports, no action is required from you. Your changes are working as expected, well done!

@llvm-ci
Copy link
Collaborator

llvm-ci commented May 21, 2025

LLVM Buildbot has detected a new failure on builder llvm-clang-x86_64-gcc-ubuntu running on sie-linux-worker3 while building llvm at step 6 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/174/builds/18145

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'lld :: COFF/lto-cache-errors.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/opt -module-hash -module-summary /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/lld/test/COFF/lto-cache-errors.ll -o /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.o # RUN: at line 5
+ /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/opt -module-hash -module-summary /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/lld/test/COFF/lto-cache-errors.ll -o /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.o
/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/opt -module-hash -module-summary /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/lld/test/COFF/Inputs/lto-cache.ll -o /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp2.o # RUN: at line 6
+ /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/opt -module-hash -module-summary /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/lld/test/COFF/Inputs/lto-cache.ll -o /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp2.o
rm -Rf /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache && mkdir /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache # RUN: at line 7
+ rm -Rf /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache
+ mkdir /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache
chmod 444 /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache # RUN: at line 8
+ chmod 444 /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache
not /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/lld-link /lldltocache:/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache/nonexistant/ /out:/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp3 /entry:main /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp2.o /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.o 2>&1 | /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/FileCheck /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/lld/test/COFF/lto-cache-errors.ll # RUN: at line 11
+ not /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/lld-link /lldltocache:/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache/nonexistant/ /out:/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp3 /entry:main /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp2.o /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.o
+ /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/FileCheck /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/lld/test/COFF/lto-cache-errors.ll

--

********************


@Kewen12 Kewen12 deleted the revert-140254-tim/floating-point-predicate-utils branch May 22, 2025 00:01
@llvm-ci
Copy link
Collaborator

llvm-ci commented May 22, 2025

LLVM Buildbot has detected a new failure on builder llvm-clang-key-instructions running on sie-linux-worker5 while building llvm at step 6 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/208/builds/1357

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'lld :: COFF/lto-cache-errors.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/home/buildbot/buildbot-root/llvm-ki/build/bin/opt -module-hash -module-summary /home/buildbot/buildbot-root/llvm-ki/llvm-project/lld/test/COFF/lto-cache-errors.ll -o /home/buildbot/buildbot-root/llvm-ki/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.o # RUN: at line 5
+ /home/buildbot/buildbot-root/llvm-ki/build/bin/opt -module-hash -module-summary /home/buildbot/buildbot-root/llvm-ki/llvm-project/lld/test/COFF/lto-cache-errors.ll -o /home/buildbot/buildbot-root/llvm-ki/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.o
/home/buildbot/buildbot-root/llvm-ki/build/bin/opt -module-hash -module-summary /home/buildbot/buildbot-root/llvm-ki/llvm-project/lld/test/COFF/Inputs/lto-cache.ll -o /home/buildbot/buildbot-root/llvm-ki/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp2.o # RUN: at line 6
+ /home/buildbot/buildbot-root/llvm-ki/build/bin/opt -module-hash -module-summary /home/buildbot/buildbot-root/llvm-ki/llvm-project/lld/test/COFF/Inputs/lto-cache.ll -o /home/buildbot/buildbot-root/llvm-ki/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp2.o
rm -Rf /home/buildbot/buildbot-root/llvm-ki/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache && mkdir /home/buildbot/buildbot-root/llvm-ki/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache # RUN: at line 7
+ rm -Rf /home/buildbot/buildbot-root/llvm-ki/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache
+ mkdir /home/buildbot/buildbot-root/llvm-ki/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache
chmod 444 /home/buildbot/buildbot-root/llvm-ki/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache # RUN: at line 8
+ chmod 444 /home/buildbot/buildbot-root/llvm-ki/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache
not /home/buildbot/buildbot-root/llvm-ki/build/bin/lld-link /lldltocache:/home/buildbot/buildbot-root/llvm-ki/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache/nonexistant/ /out:/home/buildbot/buildbot-root/llvm-ki/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp3 /entry:main /home/buildbot/buildbot-root/llvm-ki/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp2.o /home/buildbot/buildbot-root/llvm-ki/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.o 2>&1 | /home/buildbot/buildbot-root/llvm-ki/build/bin/FileCheck /home/buildbot/buildbot-root/llvm-ki/llvm-project/lld/test/COFF/lto-cache-errors.ll # RUN: at line 11
+ not /home/buildbot/buildbot-root/llvm-ki/build/bin/lld-link /lldltocache:/home/buildbot/buildbot-root/llvm-ki/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache/nonexistant/ /out:/home/buildbot/buildbot-root/llvm-ki/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp3 /entry:main /home/buildbot/buildbot-root/llvm-ki/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp2.o /home/buildbot/buildbot-root/llvm-ki/build/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.o
+ /home/buildbot/buildbot-root/llvm-ki/build/bin/FileCheck /home/buildbot/buildbot-root/llvm-ki/llvm-project/lld/test/COFF/lto-cache-errors.ll

--

********************


@llvm-ci
Copy link
Collaborator

llvm-ci commented May 22, 2025

LLVM Buildbot has detected a new failure on builder clang-aarch64-sve-vls running on linaro-g3-02 while building llvm at step 7 "ninja check 1".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/143/builds/7873

Here is the relevant piece of the build log for the reference
Step 7 (ninja check 1) failure: stage 1 checked (failure)
******************** TEST 'lld :: COFF/lto-cache-errors.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/home/tcwg-buildbot/worker/clang-aarch64-sve-vls/stage1/bin/opt -module-hash -module-summary /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/llvm/lld/test/COFF/lto-cache-errors.ll -o /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/stage1/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.o # RUN: at line 5
+ /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/stage1/bin/opt -module-hash -module-summary /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/llvm/lld/test/COFF/lto-cache-errors.ll -o /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/stage1/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.o
/home/tcwg-buildbot/worker/clang-aarch64-sve-vls/stage1/bin/opt -module-hash -module-summary /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/llvm/lld/test/COFF/Inputs/lto-cache.ll -o /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/stage1/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp2.o # RUN: at line 6
+ /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/stage1/bin/opt -module-hash -module-summary /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/llvm/lld/test/COFF/Inputs/lto-cache.ll -o /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/stage1/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp2.o
rm -Rf /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/stage1/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache && mkdir /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/stage1/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache # RUN: at line 7
+ rm -Rf /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/stage1/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache
+ mkdir /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/stage1/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache
chmod 444 /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/stage1/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache # RUN: at line 8
+ chmod 444 /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/stage1/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache
not /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/stage1/bin/lld-link /lldltocache:/home/tcwg-buildbot/worker/clang-aarch64-sve-vls/stage1/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache/nonexistant/ /out:/home/tcwg-buildbot/worker/clang-aarch64-sve-vls/stage1/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp3 /entry:main /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/stage1/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp2.o /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/stage1/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.o 2>&1 | /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/stage1/bin/FileCheck /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/llvm/lld/test/COFF/lto-cache-errors.ll # RUN: at line 11
+ not /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/stage1/bin/lld-link /lldltocache:/home/tcwg-buildbot/worker/clang-aarch64-sve-vls/stage1/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache/nonexistant/ /out:/home/tcwg-buildbot/worker/clang-aarch64-sve-vls/stage1/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp3 /entry:main /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/stage1/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp2.o /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/stage1/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.o
+ /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/stage1/bin/FileCheck /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/llvm/lld/test/COFF/lto-cache-errors.ll

--

********************


@llvm-ci
Copy link
Collaborator

llvm-ci commented May 22, 2025

LLVM Buildbot has detected a new failure on builder premerge-monolithic-windows running on premerge-windows-1 while building llvm at step 5 "clean-build-dir".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/35/builds/10284

Here is the relevant piece of the build log for the reference
Step 5 (clean-build-dir) failure: Delete failed. (failure)
Step 8 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'lit :: timeout-hang.py' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 13
not env -u FILECHECK_OPTS "C:\Python39\python.exe" C:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\utils\lit\lit.py -j1 --order=lexical Inputs/timeout-hang/run-nonexistent.txt  --timeout=1 --param external=0 | "C:\Python39\python.exe" C:\ws\buildbot\premerge-monolithic-windows\build\utils\lit\tests\timeout-hang.py 1
# executed command: not env -u FILECHECK_OPTS 'C:\Python39\python.exe' 'C:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\utils\lit\lit.py' -j1 --order=lexical Inputs/timeout-hang/run-nonexistent.txt --timeout=1 --param external=0
# .---command stderr------------
# | lit.py: C:\ws\buildbot\premerge-monolithic-windows\llvm-project\llvm\utils\lit\lit\main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 1 seconds was requested on the command line. Forcing timeout to be 1 seconds.
# `-----------------------------
# executed command: 'C:\Python39\python.exe' 'C:\ws\buildbot\premerge-monolithic-windows\build\utils\lit\tests\timeout-hang.py' 1
# .---command stdout------------
# | Testing took as long or longer than timeout
# `-----------------------------
# error: command failed with exit status: 1

--

********************


@llvm-ci
Copy link
Collaborator

llvm-ci commented May 22, 2025

LLVM Buildbot has detected a new failure on builder sanitizer-x86_64-linux-fast running on sanitizer-buildbot3 while building llvm at step 2 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/169/builds/11645

Here is the relevant piece of the build log for the reference
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using lld-link: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using lld-link: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 89767 tests, 88 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 
FAIL: lld :: COFF/lto-cache-errors.ll (21527 of 89767)
******************** TEST 'lld :: COFF/lto-cache-errors.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/opt -module-hash -module-summary /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/test/COFF/lto-cache-errors.ll -o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.o # RUN: at line 5
+ /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/opt -module-hash -module-summary /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/test/COFF/lto-cache-errors.ll -o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.o
/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/opt -module-hash -module-summary /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/test/COFF/Inputs/lto-cache.ll -o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp2.o # RUN: at line 6
+ /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/opt -module-hash -module-summary /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/test/COFF/Inputs/lto-cache.ll -o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp2.o
rm -Rf /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache && mkdir /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache # RUN: at line 7
+ rm -Rf /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache
+ mkdir /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache
chmod 444 /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache # RUN: at line 8
+ chmod 444 /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache
not /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/lld-link /lldltocache:/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache/nonexistant/ /out:/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp3 /entry:main /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp2.o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.o 2>&1 | /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/FileCheck /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/test/COFF/lto-cache-errors.ll # RUN: at line 11
+ /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/FileCheck /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/test/COFF/lto-cache-errors.ll
+ not /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/lld-link /lldltocache:/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache/nonexistant/ /out:/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp3 /entry:main /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp2.o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.o

--

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
Slowest Tests:
--------------------------------------------------------------------------
477.96s: LLVM :: CodeGen/AMDGPU/sched-group-barrier-pipeline-solver.mir
335.13s: Clang :: Driver/fsanitize.c
261.17s: Clang :: Preprocessor/riscv-target-features.c
247.11s: LLVM :: CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
207.37s: Clang :: Driver/arm-cortex-cpus-1.c
206.57s: Clang :: OpenMP/target_defaultmap_codegen_01.cpp
205.61s: Clang :: Driver/arm-cortex-cpus-2.c
197.27s: Clang :: OpenMP/target_update_codegen.cpp
194.58s: Clang :: Preprocessor/arm-target-features.c
190.91s: Clang :: Preprocessor/aarch64-target-features.c
188.75s: LLVM :: CodeGen/AMDGPU/memintrinsic-unroll.ll
177.01s: Clang :: Preprocessor/predefined-arch-macros.c
169.26s: Clang :: Analysis/a_flaky_crash.cpp
168.20s: LLVM :: CodeGen/RISCV/attributes.ll
Step 10 (stage2/asan_ubsan check) failure: stage2/asan_ubsan check (failure)
...
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using lld-link: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using lld-link: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 89767 tests, 88 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 
FAIL: lld :: COFF/lto-cache-errors.ll (21527 of 89767)
******************** TEST 'lld :: COFF/lto-cache-errors.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/opt -module-hash -module-summary /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/test/COFF/lto-cache-errors.ll -o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.o # RUN: at line 5
+ /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/opt -module-hash -module-summary /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/test/COFF/lto-cache-errors.ll -o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.o
/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/opt -module-hash -module-summary /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/test/COFF/Inputs/lto-cache.ll -o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp2.o # RUN: at line 6
+ /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/opt -module-hash -module-summary /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/test/COFF/Inputs/lto-cache.ll -o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp2.o
rm -Rf /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache && mkdir /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache # RUN: at line 7
+ rm -Rf /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache
+ mkdir /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache
chmod 444 /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache # RUN: at line 8
+ chmod 444 /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache
not /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/lld-link /lldltocache:/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache/nonexistant/ /out:/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp3 /entry:main /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp2.o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.o 2>&1 | /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/FileCheck /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/test/COFF/lto-cache-errors.ll # RUN: at line 11
+ /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/FileCheck /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/test/COFF/lto-cache-errors.ll
+ not /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/lld-link /lldltocache:/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache/nonexistant/ /out:/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp3 /entry:main /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp2.o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.o

--

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
Slowest Tests:
--------------------------------------------------------------------------
477.96s: LLVM :: CodeGen/AMDGPU/sched-group-barrier-pipeline-solver.mir
335.13s: Clang :: Driver/fsanitize.c
261.17s: Clang :: Preprocessor/riscv-target-features.c
247.11s: LLVM :: CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
207.37s: Clang :: Driver/arm-cortex-cpus-1.c
206.57s: Clang :: OpenMP/target_defaultmap_codegen_01.cpp
205.61s: Clang :: Driver/arm-cortex-cpus-2.c
197.27s: Clang :: OpenMP/target_update_codegen.cpp
194.58s: Clang :: Preprocessor/arm-target-features.c
190.91s: Clang :: Preprocessor/aarch64-target-features.c
188.75s: LLVM :: CodeGen/AMDGPU/memintrinsic-unroll.ll
177.01s: Clang :: Preprocessor/predefined-arch-macros.c
169.26s: Clang :: Analysis/a_flaky_crash.cpp
168.20s: LLVM :: CodeGen/RISCV/attributes.ll
Step 14 (stage2/msan check) failure: stage2/msan check (failure)
...
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using lld-link: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/ld.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using lld-link: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 89765 tests, 88 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.
FAIL: lld :: COFF/lto-cache-errors.ll (24848 of 89765)
******************** TEST 'lld :: COFF/lto-cache-errors.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/opt -module-hash -module-summary /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/test/COFF/lto-cache-errors.ll -o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.o # RUN: at line 5
+ /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/opt -module-hash -module-summary /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/test/COFF/lto-cache-errors.ll -o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.o
/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/opt -module-hash -module-summary /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/test/COFF/Inputs/lto-cache.ll -o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp2.o # RUN: at line 6
+ /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/opt -module-hash -module-summary /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/test/COFF/Inputs/lto-cache.ll -o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp2.o
rm -Rf /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache && mkdir /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache # RUN: at line 7
+ rm -Rf /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache
+ mkdir /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache
chmod 444 /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache # RUN: at line 8
+ chmod 444 /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache
not /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/lld-link /lldltocache:/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache/nonexistant/ /out:/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp3 /entry:main /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp2.o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.o 2>&1 | /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/FileCheck /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/test/COFF/lto-cache-errors.ll # RUN: at line 11
+ not /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/lld-link /lldltocache:/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.cache/nonexistant/ /out:/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp3 /entry:main /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp2.o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/tools/lld/test/COFF/Output/lto-cache-errors.ll.tmp.o
+ /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/FileCheck /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/lld/test/COFF/lto-cache-errors.ll

--

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
Slowest Tests:
--------------------------------------------------------------------------
485.27s: LLVM :: CodeGen/AMDGPU/memintrinsic-unroll.ll
419.69s: LLVM :: CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
248.89s: LLVM :: CodeGen/AMDGPU/sched-group-barrier-pipeline-solver.mir
193.74s: Clang :: Analysis/runtime-regression.c
177.42s: Clang :: CodeGen/AArch64/sve-intrinsics/acle_sve_reinterpret.c
157.07s: LLVM :: CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
155.36s: Clang :: CodeGen/AArch64/sve-intrinsics/acle_sve_reinterpret-bfloat.c
128.69s: LLVM :: CodeGen/X86/vector-interleaved-load-i8-stride-8.ll
127.03s: LLVM :: CodeGen/AMDGPU/amdgcn.bitcast.960bit.ll
125.20s: LLVM :: CodeGen/RISCV/rvv/expandload.ll
123.55s: Clang :: CodeGen/X86/rot-intrinsics.c
121.90s: Clang :: CodeGen/X86/sse2-builtins.c
116.93s: Clang :: CodeGen/X86/avx-builtins.c
116.16s: LLVM :: MC/Mips/mips-jump-pc-region.s

@llvm-ci
Copy link
Collaborator

llvm-ci commented May 22, 2025

LLVM Buildbot has detected a new failure on builder clang-ppc64-aix running on aix-ppc64 while building llvm at step 6 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/64/builds/3733

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'lit :: timeout-hang.py' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 13
not env -u FILECHECK_OPTS "/home/llvm/llvm-external-buildbots/workers/env/bin/python3.11" /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-ppc64-aix/llvm-project/llvm/utils/lit/lit.py -j1 --order=lexical Inputs/timeout-hang/run-nonexistent.txt  --timeout=1 --param external=0 | "/home/llvm/llvm-external-buildbots/workers/env/bin/python3.11" /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-ppc64-aix/build/utils/lit/tests/timeout-hang.py 1
# executed command: not env -u FILECHECK_OPTS /home/llvm/llvm-external-buildbots/workers/env/bin/python3.11 /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-ppc64-aix/llvm-project/llvm/utils/lit/lit.py -j1 --order=lexical Inputs/timeout-hang/run-nonexistent.txt --timeout=1 --param external=0
# .---command stderr------------
# | lit.py: /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-ppc64-aix/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 1 seconds was requested on the command line. Forcing timeout to be 1 seconds.
# `-----------------------------
# executed command: /home/llvm/llvm-external-buildbots/workers/env/bin/python3.11 /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-ppc64-aix/build/utils/lit/tests/timeout-hang.py 1
# .---command stdout------------
# | Testing took as long or longer than timeout
# `-----------------------------
# error: command failed with exit status: 1

--

********************


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
llvm:adt llvm:analysis Includes value tracking, cost tables and constant folding llvm:instcombine Covers the InstCombine, InstSimplify and AggressiveInstCombine passes llvm:transforms
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants