}
if (InvokeInst *II = dyn_cast<InvokeInst>(&MI)) {
- // Replace invoke with a NOOP intrinsic to maintain the original CFG
+ // Replace invoke with a NOP intrinsic to maintain the original CFG
Module *M = II->getParent()->getParent()->getParent();
- IntegerType *Ty = IntegerType::get(II->getContext(), 8);
- ConstantInt *CI = ConstantInt::get(Ty, 0);
- Value *Args[] = {CI, CI};
- Function *F = Intrinsic::getDeclaration(M, Intrinsic::expect, Ty);
- InvokeInst::Create(F, II->getNormalDest(), II->getUnwindDest(), Args,
- "dummy", II->getParent());
+ Function *F = Intrinsic::getDeclaration(M, Intrinsic::donothing);
+ InvokeInst::Create(F, II->getNormalDest(), II->getUnwindDest(),
+ ArrayRef<Value *>(), "", II->getParent());
}
return EraseInstFromFunction(MI);
}
; CHECK: @f2
define i64 @f2() nounwind uwtable ssp {
entry:
-; CHECK: invoke i8 @llvm.expect.i8(i8 0, i8 0)
+; CHECK: invoke void @llvm.donothing()
%call = invoke noalias i8* @_Znwm(i64 13)
to label %invoke.cont unwind label %lpad