OSDN Git Service

[PATCH] Force LoopReroll to reset the loop trip count value after reroll.
authorZinovy Nis <zinovy.nis@gmail.com>
Tue, 22 Mar 2016 13:50:57 +0000 (13:50 +0000)
committerZinovy Nis <zinovy.nis@gmail.com>
Tue, 22 Mar 2016 13:50:57 +0000 (13:50 +0000)
commit047a636babe76052a78e17859d7f6b05461bfc41
treeee9a1d5a6dcdffcef67c3c206a7a18f2123bb9dd
parent02b7dd6f8207e26d315c4973900ff49f8752e4b2
[PATCH] Force LoopReroll to reset the loop trip count value after reroll.

It's a bug fix.
For rerolled loops SE trip count remains unchanged. It leads to incorrect work of the next passes.
My patch just resets SE info for rerolled loop forcing SE to re-evaluate it next time it requested.
I also added a verifier call in the exisitng test to be sure no invalid SE data remain. Without my fix this test would fail with -verify-scev.

Differential Revision: http://reviews.llvm.org/D18316

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264051 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/LoopRerollPass.cpp
test/Transforms/LoopReroll/basic32iters.ll