The SCEVs of loops surrounding the escape users of a merge blocks are forgotten, so that loop trip counts based on old values can revoked.
This fixes https://bugs.llvm.org//show_bug.cgi?id=32536
Differential D33195
[Polly] Add invalidation of the loop SCEVs after merge block generation mbdharan on May 15 2017, 6:44 AM. Authored by
Details The SCEVs of loops surrounding the escape users of a merge blocks are forgotten, so that loop trip counts based on old values can revoked. This fixes https://bugs.llvm.org//show_bug.cgi?id=32536
Diff Detail
Event TimelineComment Actions Hi Baranidharan, thank you for the patch. Could you please add a test case as well (e.g. the .ll file from llvm.org/PR32536, minimized as far as possible and a CHECK:-line for something that is relevant. e.g. that the %num.0 = phi i32 [ %add, %for.body15 ], [ 0, %for.cond13.pre_entry_bb ] is in the right position)
Comment Actions Hi Baranidharan, the patch LGTM. An explanation into the doxygen of invalidateScalarEvolution about the added code and why it is there (like you explained in the summary) would be nice. Do you have commit rights? If not, I'd commit for you.
Comment Actions Hi @Meinersbur, Updated the diff to according comments. I don't have commit rights, so you'd have to commit for me. |