This is an archive of the discontinued LLVM Phabricator instance.

[coroutines] PR33271: Remove stray coro.save intrinsics during CoroSplit
ClosedPublic

Authored by GorNishanov on Jun 1 2017, 6:24 PM.

Details

Summary

Optimization passes may remove llvm.coro.suspend intrinsic while leaving matching llvm.coro.save intrinsic orphaned.
Make sure we clean up orphaned coro.saves. The bug manifested with a crash similar to this:

llvm_unreachable("Unknown type!");
llvm::MVT::getVT (Ty=0x489518, HandleUnknown=false)
llvm::EVT::getEVT 
llvm::TargetLoweringBase::getValueType
llvm::ComputeValueVTs
llvm::SelectionDAGBuilder::visitTargetIntrinsic

Diff Detail

Event Timeline

GorNishanov created this revision.Jun 1 2017, 6:24 PM
GorNishanov retitled this revision from PR33271: Remove stray coro.save intrinsics during CoroSplit to [coroutines] PR33271: Remove stray coro.save intrinsics during CoroSplit.
This revision was automatically updated to reflect the committed changes.