aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/ConstantRange.cpp
diff options
context:
space:
mode:
authorRamkumar Ramachandra <ramkumar.ramachandra@codasip.com>2024-11-20 09:30:35 +0000
committerGitHub <noreply@github.com>2024-11-20 09:30:35 +0000
commit2b5214b9e16cdc784def1d521ce38074a2e8c90f (patch)
treea41d0914238ee231d9132f6b1d4f948699d8e7bc /llvm/lib/IR/ConstantRange.cpp
parent288f05f63e5f3246657aca9561d75b2aa02cb6f5 (diff)
downloadllvm-2b5214b9e16cdc784def1d521ce38074a2e8c90f.zip
llvm-2b5214b9e16cdc784def1d521ce38074a2e8c90f.tar.gz
llvm-2b5214b9e16cdc784def1d521ce38074a2e8c90f.tar.bz2
IR: de-duplicate two CmpInst routines (NFC) (#116866)
De-duplicate the functions getSignedPredicate and getUnsignedPredicate, nearly identical versions of which were present in CmpInst and ICmpInst, creating less confusion.
Diffstat (limited to 'llvm/lib/IR/ConstantRange.cpp')
-rw-r--r--llvm/lib/IR/ConstantRange.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/IR/ConstantRange.cpp b/llvm/lib/IR/ConstantRange.cpp
index 61a0518..d81a292 100644
--- a/llvm/lib/IR/ConstantRange.cpp
+++ b/llvm/lib/IR/ConstantRange.cpp
@@ -20,12 +20,13 @@
//
//===----------------------------------------------------------------------===//
+#include "llvm/IR/ConstantRange.h"
#include "llvm/ADT/APInt.h"
#include "llvm/Config/llvm-config.h"
-#include "llvm/IR/ConstantRange.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/InstrTypes.h"
#include "llvm/IR/Instruction.h"
+#include "llvm/IR/Instructions.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/Metadata.h"
#include "llvm/IR/Operator.h"
@@ -191,7 +192,7 @@ CmpInst::Predicate ConstantRange::getEquivalentPredWithFlippedSignedness(
"Only for relational integer predicates!");
CmpInst::Predicate FlippedSignednessPred =
- CmpInst::getFlippedSignednessPredicate(Pred);
+ ICmpInst::getFlippedSignednessPredicate(Pred);
if (areInsensitiveToSignednessOfICmpPredicate(CR1, CR2))
return FlippedSignednessPred;