forked from OSchip/llvm-project
Fix a bug in the "expect" intrinsic lowering.
llvm-svn: 134566
This commit is contained in:
parent
bf007364bf
commit
a11f7ecbf8
|
@ -145,8 +145,11 @@ bool LowerExpectIntrinsic::runOnFunction(Function &F) {
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
Function *Fn = CI->getCalledFunction();
|
Function *Fn = CI->getCalledFunction();
|
||||||
if (Fn && Fn->getIntrinsicID() == Intrinsic::expect)
|
if (Fn && Fn->getIntrinsicID() == Intrinsic::expect) {
|
||||||
|
Value *Exp = CI->getArgOperand(0);
|
||||||
|
CI->replaceAllUsesWith(Exp);
|
||||||
CI->eraseFromParent();
|
CI->eraseFromParent();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue