[PATCH] D32104: Teach SCEV normalization to de/normalize non-affine add recs

Sanjoy Das via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 14 17:02:46 PDT 2017


sanjoy created this revision.
Herald added subscribers: mzolotukhin, mcrosier.

Before this change, SCEV Normalization would incorrectly normalize
non-affine add recurrences.  To work around this there was (still is)
a check in place to make sure we only tried to normalize affine add
recurrences.

We recently found a bug in aforementioned check to bail out of
normalizing non-affine add recurrences.  However, instead of fixing
the bailout, I have decided to teach SCEV normalization to work
correctly with non-affine add recurrences, making the bailout
unnecessary (I'll remove it in a subsequent change).

I've also added some unit tests (which would have failed before this
change).


https://reviews.llvm.org/D32104

Files:
  lib/Analysis/ScalarEvolutionNormalization.cpp
  unittests/Analysis/ScalarEvolutionTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32104.95365.patch
Type: text/x-patch
Size: 7610 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170415/078ed365/attachment.bin>


More information about the llvm-commits mailing list