forked from OSchip/llvm-project
Codegen support for the llvm.invariant/lifetime.start/end intrinsics:
just throw them away. llvm-svn: 86678
This commit is contained in:
parent
f9667229a1
commit
dca0c28452
|
@ -515,6 +515,15 @@ void IntrinsicLowering::LowerIntrinsicCall(CallInst *CI) {
|
|||
if (CI->getType() != Type::getVoidTy(Context))
|
||||
CI->replaceAllUsesWith(ConstantInt::get(CI->getType(), 1));
|
||||
break;
|
||||
case Intrinsic::invariant_start:
|
||||
case Intrinsic::lifetime_start:
|
||||
// Discard region information.
|
||||
CI->replaceAllUsesWith(UndefValue::get(CI->getType()));
|
||||
break;
|
||||
case Intrinsic::invariant_end:
|
||||
case Intrinsic::lifetime_end:
|
||||
// Discard region information.
|
||||
break;
|
||||
}
|
||||
|
||||
assert(CI->use_empty() &&
|
||||
|
|
|
@ -4409,6 +4409,16 @@ SelectionDAGLowering::visitIntrinsicCall(CallInst &I, unsigned Intrinsic) {
|
|||
return implVisitBinaryAtomic(I, ISD::ATOMIC_LOAD_UMAX);
|
||||
case Intrinsic::atomic_swap:
|
||||
return implVisitBinaryAtomic(I, ISD::ATOMIC_SWAP);
|
||||
|
||||
case Intrinsic::invariant_start:
|
||||
case Intrinsic::lifetime_start:
|
||||
// Discard region information.
|
||||
setValue(&I, DAG.getUNDEF(TLI.getPointerTy()));
|
||||
return 0;
|
||||
case Intrinsic::invariant_end:
|
||||
case Intrinsic::lifetime_end:
|
||||
// Discard region information.
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue