[PATCH] D36215: [IRCE] Identify loops with latch comparison against current IV value

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 2 04:17:23 PDT 2017


mkazantsev created this revision.

Current implementation of parseLoopStructure interprets the latch comparison as a
comarison against `iv.next`. If the actual comparison is made against the `iv` current value
then the loop may be rejected, because this misinterpretation leads to incorrect evaluation
of the latch start value.

This patch teaches the IRCE to distinguish this kind of loops and perform the optimization
for them.


https://reviews.llvm.org/D36215

Files:
  lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
  test/Transforms/IRCE/latch-comparison-against-current-value.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36215.109321.patch
Type: text/x-patch
Size: 4669 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170802/66cf6113/attachment.bin>


More information about the llvm-commits mailing list