Skip to content

Commit

Permalink
[GlobalISel] Don't use Register type for getNumOperands(). NFCI.
Browse files Browse the repository at this point in the history
Copy+Paste typo - we were storing getNumOperands() opcounts in a Register type instead of just an unsigned.
  • Loading branch information
RKSimon committed Nov 5, 2020
1 parent d413f4b commit 7fe7c6d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions llvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp
Expand Up @@ -416,7 +416,7 @@ void GISelKnownBits::computeKnownBitsImpl(Register R, KnownBits &Known,
break;
}
case TargetOpcode::G_MERGE_VALUES: {
Register NumOps = MI.getNumOperands();
unsigned NumOps = MI.getNumOperands();
unsigned OpSize = MRI.getType(MI.getOperand(1).getReg()).getSizeInBits();

for (unsigned I = 0; I != NumOps - 1; ++I) {
Expand All @@ -428,7 +428,7 @@ void GISelKnownBits::computeKnownBitsImpl(Register R, KnownBits &Known,
break;
}
case TargetOpcode::G_UNMERGE_VALUES: {
Register NumOps = MI.getNumOperands();
unsigned NumOps = MI.getNumOperands();
Register SrcReg = MI.getOperand(NumOps - 1).getReg();
if (MRI.getType(SrcReg).isVector())
return; // TODO: Handle vectors.
Expand Down

0 comments on commit 7fe7c6d

Please sign in to comment.