[PATCH] D78544: FixIrreducible: don't crash when moving a child loop

Sameer Sahasrabuddhe via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 21 01:35:22 PDT 2020


sameerds created this revision.
Herald added subscribers: llvm-commits, aheejin, hiraditya.
Herald added a project: LLVM.
sameerds updated this revision to Diff 258923.
sameerds added a comment.
sameerds edited the summary of this revision.
sameerds added reviewers: arsenm, kripken, gkistanova.
Herald added a subscriber: wdng.

Added bug ID to the commit description


When an irreducible SCC is converted into a new natural loop, existing
loops included in that SCC now become children of the new loop. The
logic that moves these loops from the parent loop to the new loop
invoked undefined behaviour when it modified the container that it was
iterating over. Fixed this by first extracting all the loops that are
to be removed from the parent.

Fixes bug 45623.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D78544

Files:
  llvm/lib/Transforms/Utils/FixIrreducible.cpp
  llvm/test/Transforms/FixIrreducible/bug45623.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78544.258923.patch
Type: text/x-patch
Size: 6131 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200421/04050457/attachment.bin>


More information about the llvm-commits mailing list