Skip to content

Commit

Permalink
[Metadata] Make range boundary variables unsigned (NFC)
Browse files Browse the repository at this point in the history
They should be unsigned because the source and target value are too.
  • Loading branch information
AreaZR authored Jul 17, 2024
1 parent 351a4b2 commit 7e138bd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions llvm/lib/IR/Metadata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 7e138bd

Please sign in to comment.