AArch64: Add debug message for large shift constants.

As requested in code review.

llvm-svn: 230517
This commit is contained in:
Matthias Braun 2015-02-25 18:03:50 +00:00
parent 2a102cbc77
commit 02892ec62d
1 changed files with 8 additions and 2 deletions

View File

@ -1399,8 +1399,11 @@ static bool isBitfieldExtractOpFromAnd(SelectionDAG *CurDAG, SDNode *N,
// Bail out on large immediates. This happens when no proper
// combining/constant folding was performed.
if (!BiggerPattern && (Srl_imm <= 0 || Srl_imm >= VT.getSizeInBits()))
if (!BiggerPattern && (Srl_imm <= 0 || Srl_imm >= VT.getSizeInBits())) {
DEBUG((dbgs() << N
<< ": Found large shift immediate, this should not happen\n"));
return false;
}
LSB = Srl_imm;
MSB = Srl_imm + (VT == MVT::i32 ? countTrailingOnes<uint32_t>(And_imm)
@ -1506,8 +1509,11 @@ static bool isBitfieldExtractOpFromShr(SDNode *N, unsigned &Opc, SDValue &Opd0,
// Missing combines/constant folding may have left us with strange
// constants.
if (Shl_imm >= VT.getSizeInBits())
if (Shl_imm >= VT.getSizeInBits()) {
DEBUG((dbgs() << N
<< ": Found large shift immediate, this should not happen\n"));
return false;
}
uint64_t Srl_imm = 0;
if (!isIntImmediate(N->getOperand(1), Srl_imm))