[DAG] Pull out ComputeNumSignBits call to make debugging easier. NFCI.

llvm-svn: 357861
This commit is contained in:
Simon Pilgrim 2019-04-07 11:49:33 +00:00
parent 07adb6abda
commit 561ba38623
1 changed files with 2 additions and 2 deletions

View File

@ -1130,8 +1130,8 @@ bool TargetLowering::SimplifyDemandedBits(
// If we only care about the highest bit, don't bother shifting right.
if (DemandedBits.isSignMask()) {
bool AlreadySignExtended =
TLO.DAG.ComputeNumSignBits(Op0) >= BitWidth - ExVTBits + 1;
unsigned NumSignBits = TLO.DAG.ComputeNumSignBits(Op0);
bool AlreadySignExtended = NumSignBits >= BitWidth - ExVTBits + 1;
// However if the input is already sign extended we expect the sign
// extension to be dropped altogether later and do not simplify.
if (!AlreadySignExtended) {