Commit c7430e8d authored by Tobias Tebbi's avatar Tobias Tebbi Committed by Commit Bot

[turbofan] handle killed branches in branch-elimination

Bug: chromium:814084
Change-Id: Ic23091e1cd778b09406c2bcde1a718e464655729
Reviewed-on: https://chromium-review.googlesource.com/939386Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51600}
parent 7cbf9f84
......@@ -62,7 +62,9 @@ Reduction BranchElimination::ReduceBranch(Node* node) {
// If we know the condition we can discard the branch.
if (from_input.LookupCondition(condition, &branch, &condition_value)) {
// Mark the branch as a safety check.
if (IsSafetyCheckOf(node->op()) == IsSafetyCheck::kSafetyCheck) {
// Check if {branch} is dead because we might have a stale side-table entry.
if (IsSafetyCheckOf(node->op()) == IsSafetyCheck::kSafetyCheck &&
!branch->IsDead()) {
NodeProperties::ChangeOp(branch,
common()->MarkAsSafetyCheck(branch->op()));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment