Stop emitting lifetime region info when stack coloring is not enabled in O0

- this should fix PR13780

llvm-svn: 163370
This commit is contained in:
Michael Liao 2012-09-07 05:13:00 +00:00
parent 1fde8ece37
commit b7cd341901
1 changed files with 6 additions and 0 deletions

View File

@ -5218,6 +5218,12 @@ SelectionDAGBuilder::visitIntrinsicCall(const CallInst &I, unsigned Intrinsic) {
}
case Intrinsic::lifetime_start:
case Intrinsic::lifetime_end: {
// Stack coloring is not enabled in O0, discard region information.
if (TM.getOptLevel() == CodeGenOpt::None) {
if (Intrinsic == Intrinsic::lifetime_start)
setValue(&I, DAG.getUNDEF(TLI.getPointerTy()));
return 0;
}
SDValue Ops[2];
AllocaInst *LifetimeObject =dyn_cast_or_null<AllocaInst>(
GetUnderlyingObject(I.getArgOperand(1), TD));