summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2016-01-23 04:05:18 +0000
committerMatthias Braun <matze@braunis.de>2016-01-23 04:05:18 +0000
commit985bdf90847994ae1e0bf99cdcb7a4274ac1748a (patch)
treedf37841ab72b607a05a963d68fba1e220ea2d902
parentfd13c14669cec8889fc121cb5dfde059242c68f8 (diff)
downloadbcm5719-llvm-985bdf90847994ae1e0bf99cdcb7a4274ac1748a.tar.gz
bcm5719-llvm-985bdf90847994ae1e0bf99cdcb7a4274ac1748a.zip
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
-rw-r--r--llvm/lib/Target/AArch64/AArch64ISelLowering.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
index dea10218b58..e4da7070e94 100644
--- a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+++ b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
@@ -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);
OpenPOWER on IntegriCloud