InstCombine: Don't shrink allocas when combining with a bitcast.
authorJim Grosbach <grosbach@apple.com>
Wed, 6 Mar 2013 05:44:53 +0000 (05:44 +0000)
committerJim Grosbach <grosbach@apple.com>
Wed, 6 Mar 2013 05:44:53 +0000 (05:44 +0000)
commit186d8a3d67ccd2b2401c5d7d4e2cc15c4d1fdeae
tree6576d682ded82491fbd57f9bfee66256ee1a8b64
parent508d11b19cfd0f2231037d28f4ce6ab428929d3b
InstCombine: Don't shrink allocas when combining with a bitcast.

When considering folding a bitcast of an alloca into the alloca itself,
make sure we don't shrink the amount of memory being allocated, or
things rapidly go sideways.

rdar://13324424

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176547 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineCasts.cpp
test/Transforms/Inline/devirtualize.ll
test/Transforms/InstCombine/2013-03-05-Combine-BitcastTy-Into-Alloca.ll [new file with mode: 0644]