Special-case static allocas in IndVarSimplify's loop invariant
authorDan Gohman <gohman@apple.com>
Tue, 25 Aug 2009 17:42:10 +0000 (17:42 +0000)
committerDan Gohman <gohman@apple.com>
Tue, 25 Aug 2009 17:42:10 +0000 (17:42 +0000)
commit76f497a351c562f366b5e93c27d3f1652fb48ff4
treed812d214bfb03590f07bf1b62066c62707577fe6
parent613bf1ef018514e88f64f5e60f126096963248f3
Special-case static allocas in IndVarSimplify's loop invariant
sinking code, since they are special. If the loop preheader happens
to be the entry block of a function, don't sink static allocas
out of it. This fixes PR4775.

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