mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-12 23:37:33 +00:00
Fix a bug in the "expect" intrinsic lowering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134566 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a38cfb2fce
commit
447c40c402
@ -145,8 +145,11 @@ bool LowerExpectIntrinsic::runOnFunction(Function &F) {
|
||||
continue;
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user