Fix a bug where scalarrepl would discard offset if type would match.
authorChris Lattner <sabre@nondot.org>
Wed, 30 Jan 2008 00:39:15 +0000 (00:39 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 30 Jan 2008 00:39:15 +0000 (00:39 +0000)
commitb10e0da065fc2c18b5bee9011eb249e223a23108
tree89c7e5283190fb0beeb3936eb25ce75f40037a45
parentb625f2f8960de32bc973092aaee8ac62863006fe
Fix a bug where scalarrepl would discard offset if type would match.
In practice this can only happen on code with already undefined behavior,
but this is still a good thing to handle correctly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46539 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/ScalarReplAggregates.cpp
test/Transforms/ScalarRepl/2008-01-29-PromoteBug.ll [new file with mode: 0644]