fix RewriteStoreUserOfWholeAlloca to use the correct type size
authorChris Lattner <sabre@nondot.org>
Fri, 8 May 2009 15:54:41 +0000 (15:54 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 8 May 2009 15:54:41 +0000 (15:54 +0000)
commitef554846f061b9b467e7824f8d01e3c59778f3f6
treef97e89519e8214fab89332ff73c363af96c57e33
parent4b7f7a6e1f3eacf116472c1b0d0eaddf01fa4495
fix RewriteStoreUserOfWholeAlloca to use the correct type size
method, fixing a crash on PR4146.  While the store will
ultimately overwrite the "padded size" number of bits in memory,
the stored value may be a subset of this size.  This function
only wants to handle the case where all bits are stored.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71224 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/ScalarReplAggregates.cpp
test/Transforms/ScalarRepl/2009-05-08-I1Crash.ll [new file with mode: 0644]