Skip to content

Commit

Permalink
[SelectionDAG] ComputeNumSignBits - clang-format + improve *EXTLOAD c…
Browse files Browse the repository at this point in the history
…omments. NFCI.

Pre-commit requested for D62777.

llvm-svn: 362485
  • Loading branch information
RKSimon committed Jun 4, 2019
1 parent 5d5078e commit 3178546
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Expand Up @@ -3878,13 +3878,13 @@ unsigned SelectionDAG::ComputeNumSignBits(SDValue Op, const APInt &DemandedElts,
if (LoadSDNode *LD = dyn_cast<LoadSDNode>(Op)) {
unsigned ExtType = LD->getExtensionType();
switch (ExtType) {
default: break;
case ISD::SEXTLOAD: // '17' bits known
Tmp = LD->getMemoryVT().getScalarSizeInBits();
return VTBits-Tmp+1;
case ISD::ZEXTLOAD: // '16' bits known
Tmp = LD->getMemoryVT().getScalarSizeInBits();
return VTBits-Tmp;
default: break;
case ISD::SEXTLOAD: // e.g. i16->i32 = '17' bits known.
Tmp = LD->getMemoryVT().getScalarSizeInBits();
return VTBits - Tmp + 1;
case ISD::ZEXTLOAD: // e.g. i16->i32 = '16' bits known.
Tmp = LD->getMemoryVT().getScalarSizeInBits();
return VTBits - Tmp;
}
}
}
Expand Down

0 comments on commit 3178546

Please sign in to comment.