diff options
Diffstat (limited to 'llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp b/llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp index 319e5c79da4..a6356da2ecb 100644 --- a/llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp +++ b/llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp @@ -716,8 +716,8 @@ bool PlaceSafepoints::runOnFunction(Function &F) { CallSite &CS = ParsePointNeeded[i]; Value *GCResult = Results[i]; if (GCResult) { - // Can not RAUW for the gc result in case of phi nodes preset. - assert(!isa<PHINode>(cast<Instruction>(GCResult)->getParent()->begin())); + // Can not RAUW for the invoke gc result in case of phi nodes preset. + assert(CS.isCall() || !isa<PHINode>(cast<Instruction>(GCResult)->getParent()->begin())); // Replace all uses with the new call CS.getInstruction()->replaceAllUsesWith(GCResult); |