[RS4GC] Fix rematerialization of bitcast of bitcast.
authorManuel Jacob <me@manueljacob.de>
Mon, 28 Dec 2015 20:14:05 +0000 (20:14 +0000)
committerManuel Jacob <me@manueljacob.de>
Mon, 28 Dec 2015 20:14:05 +0000 (20:14 +0000)
commit912373de69045e491d6a301611ce31a2914a7d43
tree778a6966d49075a70c7256a7a1539fed6c27b831
parent84f6badcccd77214a13fb2afefb6d110915c6bb6
[RS4GC] Fix rematerialization of bitcast of bitcast.

Summary:
Previously, only the outer (last) bitcast was rematerialized, resulting in a
use of the unrelocated inner (first) bitcast after the statepoint.  See the
test case for an example.

Reviewers: igor-laevsky, reames

Subscribers: reames, alex, llvm-commits, sanjoy

Differential Revision: http://reviews.llvm.org/D15789

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256520 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
test/Transforms/RewriteStatepointsForGC/rematerialize-derived-pointers.ll