Fix PR590 and Transforms/Mem2Reg/2005-06-30-ReadBeforeWrite.ll.
authorChris Lattner <sabre@nondot.org>
Thu, 30 Jun 2005 07:29:44 +0000 (07:29 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 30 Jun 2005 07:29:44 +0000 (07:29 +0000)
commit6cfd1ebcd3d4c3b886b6b41b49806142ceb6275a
treec4a302da7cadbbb2b70166535fb8da87f57b0067
parente04f865da209f221a43484cabf81c35c9d42a868
Fix PR590 and Transforms/Mem2Reg/2005-06-30-ReadBeforeWrite.ll.

The optimization for locally used allocas was not safe for allocas that
were read before they were written.  This change disables that optimization
in that case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22318 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/PromoteMemoryToRegister.cpp