[PATCH] D33846: [IRCE] Canonicalize pre/post loops after the blocks are added into parent loop

Anna Thomas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 2 11:59:10 PDT 2017


anna created this revision.

We were canonizalizing the pre loop (into loop-simplify form) before
the post loop blocks were added into parent loop. This is incorrect when IRCE is
done on a subloop. The post-loop blocks are created, but not yet added to the
parent loop. So, loop-simplification on the pre-loop incorrectly updates
LoopInfo.

This patch corrects the ordering so that pre and post loop blocks are added to
parent loop (if any), and then the loops are canonicalized to LCSSA and
LoopSimplifyForm.


https://reviews.llvm.org/D33846

Files:
  lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
  test/Transforms/IRCE/correct-loop-info.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33846.101256.patch
Type: text/x-patch
Size: 4359 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170602/8daf6937/attachment.bin>


More information about the llvm-commits mailing list