[llvm] [Metadata] Make range boundary variables unsigned (NFC) (PR #99338)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 17 08:17:50 PDT 2024
https://github.com/AtariDreams created https://github.com/llvm/llvm-project/pull/99338
They should be unsigned because the source and target value are too.
>From 7e138bd901744fbb4fb38546d60216106f750205 Mon Sep 17 00:00:00 2001
From: AtariDreams <gfunni234 at gmail.com>
Date: Wed, 17 Jul 2024 11:17:33 -0400
Subject: [PATCH] [Metadata] Make range boundary variables unsigned (NFC)
They should be unsigned because the source and target value are too.
---
llvm/lib/IR/Metadata.cpp | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/llvm/lib/IR/Metadata.cpp b/llvm/lib/IR/Metadata.cpp
index 3aec7140510a6..ae5f5de142328 100644
--- a/llvm/lib/IR/Metadata.cpp
+++ b/llvm/lib/IR/Metadata.cpp
@@ -1287,12 +1287,12 @@ MDNode *MDNode::getMostGenericRange(MDNode *A, MDNode *B) {
return A;
// First, walk both lists in order of the lower boundary of each interval.
- // At each step, try to merge the new interval to the last one we adedd.
+ // At each step, try to merge the new interval to the last one we added.
SmallVector<ConstantInt *, 4> EndPoints;
- int AI = 0;
- int BI = 0;
- int AN = A->getNumOperands() / 2;
- int BN = B->getNumOperands() / 2;
+ unsigned AI = 0;
+ unsigned BI = 0;
+ unsigned AN = A->getNumOperands() / 2;
+ unsigned BN = B->getNumOperands() / 2;
while (AI < AN && BI < BN) {
ConstantInt *ALow = mdconst::extract<ConstantInt>(A->getOperand(2 * AI));
ConstantInt *BLow = mdconst::extract<ConstantInt>(B->getOperand(2 * BI));
More information about the llvm-commits
mailing list