OSDN Git Service

When inserting code into a loop preheader, insert it before the
authorDan Gohman <gohman@apple.com>
Wed, 24 Jun 2009 14:31:06 +0000 (14:31 +0000)
committerDan Gohman <gohman@apple.com>
Wed, 24 Jun 2009 14:31:06 +0000 (14:31 +0000)
commit32a81a3f6d75c5343e7df65ce5d228f2128ca943
treefa4c4d4b3387abafbb90850cc3f08cc49b96109f
parentcd58c5940cfe87030aeaaa49ef56ed2797b35baa
When inserting code into a loop preheader, insert it before the
terminator, instead of after the last phi. This fixes a bug
exposed by ScalarEvolution analyzing more kinds of loops.
This fixes PR4436.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74072 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/IndVarSimplify.cpp
test/Transforms/IndVarSimplify/loop_evaluate7.ll [new file with mode: 0644]