[RS4GC] Fix crash in the case that a live variable has a constant base.
authorManuel Jacob <me@manueljacob.de>
Tue, 22 Dec 2015 16:50:44 +0000 (16:50 +0000)
committerManuel Jacob <me@manueljacob.de>
Tue, 22 Dec 2015 16:50:44 +0000 (16:50 +0000)
commitf8bc6b53de9295bb11aa334888421269bda8c7ca
tree85196a3e3380b6dc2e7c77ceff2b867532c0d0d4
parent3ff9f0996f1ffccd3d938bf4cb8c740f532150a7
[RS4GC] Fix crash in the case that a live variable has a constant base.

Summary:
Previously, RS4GC crashed in CreateGCRelocates() because it assumed
that every base is also in the array of live variables, which isn't true if a
live variable has a constant base.

This change fixes the crash by making sure CreateGCRelocates() won't try to
relocate a live variable with a constant base.  This would be unnecessary
anyway because anything with a constant base won't move.

Reviewers: reames

Subscribers: llvm-commits, sanjoy

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256252 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
test/Transforms/RewriteStatepointsForGC/base-pointers-12.ll [new file with mode: 0644]
test/Transforms/RewriteStatepointsForGC/base-pointers-13.ll [new file with mode: 0644]