HomePhabricator

[LoopFlatten] Fix invalid assertion (PR49571)

Authored by TaWeiTu on Wed, Mar 24, 3:07 AM.

Description

[LoopFlatten] Fix invalid assertion (PR49571)

The InductionPHI is not necessarily the increment instruction, as
demonstrated in pr49571.ll.
This patch removes the assertion and instead bails out from the
LoopFlatten pass if that happens.

This fixes https://bugs.llvm.org/show_bug.cgi?id=49571

Reviewed By: SjoerdMeijer

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

Details

Committed
TaWeiTuWed, Mar 24, 3:08 AM
Reviewer
SjoerdMeijer
Differential Revision
D99252: [LoopFlatten] Fix invalid assertion (PR49571)
Parents
rG8fde25b3c3db: [NFC] Remove redundant `struct` prefix
Branches
Unknown
Tags
Unknown