OSDN Git Service

[PlaceSafepoints] Assertion on that gc_result can not have preceding phis should...
authorChen Li <meloli87@gmail.com>
Mon, 18 May 2015 19:02:25 +0000 (19:02 +0000)
committerChen Li <meloli87@gmail.com>
Mon, 18 May 2015 19:02:25 +0000 (19:02 +0000)
commit2306579644f1b16e5c829af5d87f4034d65d2d08
treea40f8f1b70ed5063ca369eb7e63fc6fcf7e81143
parent7b81f734eec34a475226ad4301ecc5c281a41a3c
[PlaceSafepoints] Assertion on that gc_result can not have preceding phis should only apply to invoke statepoint

Summary: When PlaceSafepoints pass replaces old return result with gc_result from statepoint, it asserts that gc_result can not have preceding phis in its parent block. This is only true on invoke statepoint, which terminates the block and puts its result at the beginning of the normal successor block. Call statepoint does not terminate the block and thus its result is in the same block with it. There should be no restriction on whether there are phis or not.

Reviewers: reames, igor-laevsky

Reviewed By: igor-laevsky

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237597 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/PlaceSafepoints.cpp
test/Transforms/PlaceSafepoints/call_gc_result.ll [new file with mode: 0644]