aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorKewen12 <Kewen.Meng@amd.com>2025-05-21 16:31:14 -0700
committerGitHub <noreply@github.com>2025-05-21 19:31:14 -0400
commitc47a5fbb229bbdee30aeb4e5761e8c083f2fe680 (patch)
tree2364232217c0831266268e7ae032cc73d18def7d /llvm/lib/CodeGen
parent60ad6e3fa45c03dc1fc7521ead7583a9a7d9fb61 (diff)
downloadllvm-c47a5fbb229bbdee30aeb4e5761e8c083f2fe680.zip
llvm-c47a5fbb229bbdee30aeb4e5761e8c083f2fe680.tar.gz
llvm-c47a5fbb229bbdee30aeb4e5761e8c083f2fe680.tar.bz2
Revert "[llvm] add GenericFloatingPointPredicateUtils (#140254)" (#140968)
This reverts commit d00d74bb2564103ae3cb5ac6b6ffecf7e1cc2238. The PR breaks our buildbots and blocks downstream merge.
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/CMakeLists.txt1
-rw-r--r--llvm/lib/CodeGen/CodeGenPrepare.cpp1
-rw-r--r--llvm/lib/CodeGen/MachineFloatingPointPredicateUtils.cpp48
3 files changed, 0 insertions, 50 deletions
diff --git a/llvm/lib/CodeGen/CMakeLists.txt b/llvm/lib/CodeGen/CMakeLists.txt
index dcf7c08..5dd6413 100644
--- a/llvm/lib/CodeGen/CMakeLists.txt
+++ b/llvm/lib/CodeGen/CMakeLists.txt
@@ -119,7 +119,6 @@ add_llvm_component_library(LLVMCodeGen
MachineCycleAnalysis.cpp
MachineDebugify.cpp
MachineDomTreeUpdater.cpp
- MachineFloatingPointPredicateUtils.cpp
MachineDominanceFrontier.cpp
MachineDominators.cpp
MachineFrameInfo.cpp
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp
index 5226302..76f2762 100644
--- a/llvm/lib/CodeGen/CodeGenPrepare.cpp
+++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp
@@ -24,7 +24,6 @@
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/BlockFrequencyInfo.h"
#include "llvm/Analysis/BranchProbabilityInfo.h"
-#include "llvm/Analysis/FloatingPointPredicateUtils.h"
#include "llvm/Analysis/InstructionSimplify.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/ProfileSummaryInfo.h"
diff --git a/llvm/lib/CodeGen/MachineFloatingPointPredicateUtils.cpp b/llvm/lib/CodeGen/MachineFloatingPointPredicateUtils.cpp
deleted file mode 100644
index 3f640de..0000000
--- a/llvm/lib/CodeGen/MachineFloatingPointPredicateUtils.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-//===- MachineFloatingPointPredicateUtils.cpp -----------------------------===//
-//
-// 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
-//
-//===----------------------------------------------------------------------===//
-
-#include "llvm/CodeGen/MachineFloatingPointPredicateUtils.h"
-#include "llvm/CodeGen/GlobalISel/MIPatternMatch.h"
-#include "llvm/CodeGen/LowLevelTypeUtils.h"
-#include "llvm/CodeGen/MachineRegisterInfo.h"
-#include "llvm/CodeGen/MachineSSAContext.h"
-#include "llvm/IR/Constants.h"
-#include <optional>
-
-namespace llvm {
-
-using namespace MIPatternMatch;
-
-template <>
-DenormalMode
-MachineFloatingPointPredicateUtils::queryDenormalMode(const MachineFunction &MF,
- Register Val) {
- const MachineRegisterInfo &MRI = MF.getRegInfo();
- LLT Ty = MRI.getType(Val).getScalarType();
- return MF.getDenormalMode(getFltSemanticForLLT(Ty));
-}
-
-template <>
-bool MachineFloatingPointPredicateUtils::lookThroughFAbs(
- const MachineFunction &MF, Register LHS, Register &Src) {
- const MachineRegisterInfo &MRI = MF.getRegInfo();
- return mi_match(LHS, MRI, m_GFabs(m_Reg(Src)));
-}
-
-template <>
-std::optional<APFloat> MachineFloatingPointPredicateUtils::matchConstantFloat(
- const MachineFunction &MF, Register Val) {
- const MachineRegisterInfo &MRI = MF.getRegInfo();
- const ConstantFP *ConstVal;
- if (mi_match(Val, MRI, m_GFCst(ConstVal)))
- return ConstVal->getValueAPF();
-
- return std::nullopt;
-}
-
-} // namespace llvm