It's not safe to blindly remove invoke instructions. This happens when we
encounter an invoke of an allocation function. This should fix the dragonegg bootstrap. Testcase to follow, later. llvm-svn: 160757
This commit is contained in:
parent
279ceecf65
commit
7d0f110cb3
|
@ -352,7 +352,8 @@ static bool IsSafeComputationToRemove(Value *V) {
|
|||
return true;
|
||||
if (!V->hasOneUse())
|
||||
return false;
|
||||
if (isa<LoadInst>(V) || isa<Argument>(V) || isa<GlobalValue>(V))
|
||||
if (isa<LoadInst>(V) || isa<InvokeInst>(V) || isa<Argument>(V) ||
|
||||
isa<GlobalValue>(V))
|
||||
return false;
|
||||
if (isAllocationFn(V))
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue