[llvm] [ConstraintElimination] Fix comment (PR #125375)

Lee Wei via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 1 17:47:12 PST 2025


https://github.com/leewei05 created https://github.com/llvm/llvm-project/pull/125375

Remove unused header and fix a comment.

>From c85394f8c393ab499ebb8b4ad78210da970a8a1c Mon Sep 17 00:00:00 2001
From: Lee <lee10202013 at gmail.com>
Date: Sat, 1 Feb 2025 17:32:13 -0700
Subject: [PATCH 1/2] Remove unused header

---
 llvm/lib/Transforms/Scalar/ConstraintElimination.cpp | 1 -
 1 file changed, 1 deletion(-)

diff --git a/llvm/lib/Transforms/Scalar/ConstraintElimination.cpp b/llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
index e0861fbedc560a..17e79d57e1b3e9 100644
--- a/llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
+++ b/llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
@@ -40,7 +40,6 @@
 #include "llvm/Transforms/Utils/Cloning.h"
 #include "llvm/Transforms/Utils/ValueMapper.h"
 
-#include <cmath>
 #include <optional>
 #include <string>
 

>From 3648b02feec971a58487d2943c9d7f719d0fa58b Mon Sep 17 00:00:00 2001
From: Lee <lee10202013 at gmail.com>
Date: Sat, 1 Feb 2025 17:38:42 -0700
Subject: [PATCH 2/2] Fix comment

---
 llvm/lib/Transforms/Scalar/ConstraintElimination.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/lib/Transforms/Scalar/ConstraintElimination.cpp b/llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
index 17e79d57e1b3e9..6dd26910f68469 100644
--- a/llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
+++ b/llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
@@ -653,7 +653,7 @@ ConstraintInfo::getConstraint(CmpInst::Predicate Pred, Value *Op0, Value *Op1,
   bool IsEq = false;
   bool IsNe = false;
 
-  // Try to convert Pred to one of ULE/SLT/SLE/SLT.
+  // Try to convert Pred to one of ULE/ULT/SLE/SLT.
   switch (Pred) {
   case CmpInst::ICMP_UGT:
   case CmpInst::ICMP_UGE:



More information about the llvm-commits mailing list