1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 12:12:47 +01:00

AArch64ISelLowering: Reduce maximum recursion depth of isConjunctionDisjunctionTree()

This function will exhibit exponential runtime (2**n) so we should
rather use a lower limit.

llvm-svn: 258604
This commit is contained in:
Matthias Braun 2016-01-23 04:05:18 +00:00
parent a0ca239a6c
commit da14179563

View File

@ -1326,8 +1326,8 @@ static bool isConjunctionDisjunctionTree(const SDValue Val, bool &CanPushNegate,
CanPushNegate = true;
return true;
}
// Protect against stack overflow.
if (Depth > 15)
// Protect against exponential runtime and stack overflow.
if (Depth > 6)
return false;
if (Opcode == ISD::AND || Opcode == ISD::OR) {
SDValue O0 = Val->getOperand(0);