HomePhabricator

Loop peeling: check that latch is conditional branch

Authored by JosephTremoulet on Jan 20 2021, 8:01 AM.

Description

Loop peeling: check that latch is conditional branch

Loop peeling assumes that the loop's latch is a conditional branch. Add
a check to canPeel that explicitly checks for this, and testcases that
otherwise fail an assertion when trying to peel a loop whose back-edge
is a switch case or the non-unwind edge of an invoke.

Reviewed By: skatkov, fhahn

Differential Revision: https://reviews.llvm.org/D94995

Details

Committed
JosephTremouletJan 20 2021, 8:01 AM
Reviewer
skatkov
Differential Revision
D94995: Loop peeling: check that latch is conditional branch
Parents
rGe377c8eeb4aa: Implement dynamic mapAnyOf in terms of ASTNodeKinds
Branches
Unknown
Tags
Unknown