Allow scalarrepl to treat an all-zero GEP just as bitcast.
authorMatthijs Kooijman <matthijs@stdin.nl>
Mon, 6 Oct 2008 16:23:31 +0000 (16:23 +0000)
committerMatthijs Kooijman <matthijs@stdin.nl>
Mon, 6 Oct 2008 16:23:31 +0000 (16:23 +0000)
commit5fac55fafb53fde5c548bcd08e07418e9d8e549f
treef3737347a6427884e6ccedf027587d1933c70c43
parent96f945267c986ddedf3ec1af0f131841b056bc25
Allow scalarrepl to treat an all-zero GEP just as bitcast.

This includes not marking a GEP involving a vector as unsafe, but only when it
has all zero indices. This allows scalarrepl to work in a few more cases.

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